提交 fa25e5f9 编写于 作者: A AmyFoxFN

docs build

上级 42b81ce8
<!DOCTYPE html><html><head><meta charset=UTF-8><title>cube-ui lib</title><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,viewport-fit=cover"><link href=css/app.9e5492a1163fff3e81ab097e32eb418a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=js/manifest.346dd10710fe9c0348bf.js></script><script type=text/javascript src=js/vendor.c134248fb9f6b25aa9a1.js></script><script type=text/javascript src=js/app.2e35895484b7cfa3aa84.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=UTF-8><title>cube-ui lib</title><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,viewport-fit=cover"><link href=css/app.f5b59ce1a8ede686b3e97efff1496c68.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=js/manifest.346dd10710fe9c0348bf.js></script><script type=text/javascript src=js/vendor.d9a8312171b0688d1c2a.js></script><script type=text/javascript src=js/app.033e0b7580125203bea1.js></script></body></html>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"><meta name=x5-cache content=disable><meta name=keywords content=CUBE,UI,VUE,COMPONENT,LIB,LIBRARY><title>cube-ui Document</title><link href=/cube-ui/css/app.4c1febae071faf2acfdd0b04ec5b2d12.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/cube-ui/js/manifest.eb6264a56031bf79aaa2.js></script><script type=text/javascript src=/cube-ui/js/vendor.2a0495e5180081667952.js></script><script type=text/javascript src=/cube-ui/js/app.81d2a5e6e14cc88dc37c.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"><meta name=x5-cache content=disable><meta name=keywords content=CUBE,UI,VUE,COMPONENT,LIB,LIBRARY><title>cube-ui Document</title><link href=/cube-ui/css/app.f1236850b8581363ac8b6b5cb46e011e.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/cube-ui/js/manifest.0aeff61dfd2d17f116f2.js></script><script type=text/javascript src=/cube-ui/js/vendor.2a0495e5180081667952.js></script><script type=text/javascript src=/cube-ui/js/app.0f40f574791a9f2d9209.js></script></body></html>
\ No newline at end of file
webpackJsonp([0],{LGbK:function(t,e,n){e=t.exports=n("FZ+f")(!1),e.push([t.i,"",""])},RUos:function(t,e,n){function o(t){n("vNny")}var r=n("VU/8")(n("ZNNx"),n("jgw8"),o,null,null);t.exports=r.exports},ZNNx:function(t,e,n){var o,r,u;!function(s,c){r=[t,e,n("YKRY")],o=c,void 0!==(u="function"==typeof o?o.apply(e,r):o)&&(t.exports=u)}(0,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default={components:{Viewport:o.default}},t.exports=e.default})},jgw8:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("viewport",{attrs:{lang:"zh-CN"}})},staticRenderFns:[]}},vNny:function(t,e,n){var o=n("LGbK");"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n("rjj0")("21533b8c",o,!0,{})}});
\ No newline at end of file
webpackJsonp([0],{GAIS:function(t,e,n){var o=n("rzlu");"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n("rjj0")("62f333c5",o,!0,{})},RUos:function(t,e,n){function o(t){n("GAIS")}var r=n("VU/8")(n("ZNNx"),n("VI4S"),o,null,null);t.exports=r.exports},VI4S:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("viewport",{attrs:{lang:"zh-CN"}})},staticRenderFns:[]}},ZNNx:function(t,e,n){var o,r,u;!function(s,c){r=[t,e,n("YKRY")],o=c,void 0!==(u="function"==typeof o?o.apply(e,r):o)&&(t.exports=u)}(0,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default={components:{Viewport:o.default}},t.exports=e.default})},rzlu:function(t,e,n){e=t.exports=n("FZ+f")(!1),e.push([t.i,"",""])}});
\ No newline at end of file
webpackJsonp([1],{"+GB6":function(t,e,n){function o(t){n("1E72")}var r=n("VU/8")(n("ICiJ"),n("8iZ+"),o,null,null);t.exports=r.exports},"1E72":function(t,e,n){var o=n("H+bZ");"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n("rjj0")("2688a24f",o,!0,{})},"8iZ+":function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("viewport",{attrs:{lang:"en-US"}})},staticRenderFns:[]}},"H+bZ":function(t,e,n){e=t.exports=n("FZ+f")(!1),e.push([t.i,"",""])},ICiJ:function(t,e,n){var o,r,i;!function(u,s){r=[t,e,n("YKRY")],o=s,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default={components:{Viewport:o.default}},t.exports=e.default})}});
\ No newline at end of file
webpackJsonp([1],{"+GB6":function(t,e,n){function o(t){n("XPRW")}var r=n("VU/8")(n("ICiJ"),n("L2q9"),o,null,null);t.exports=r.exports},ICiJ:function(t,e,n){var o,r,u;!function(i,s){r=[t,e,n("YKRY")],o=s,void 0!==(u="function"==typeof o?o.apply(e,r):o)&&(t.exports=u)}(0,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default={components:{Viewport:o.default}},t.exports=e.default})},L2q9:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("viewport",{attrs:{lang:"en-US"}})},staticRenderFns:[]}},XPRW:function(t,e,n){var o=n("pPQa");"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n("rjj0")("53fa6c94",o,!0,{})},pPQa:function(t,e,n){e=t.exports=n("FZ+f")(!1),e.push([t.i,"",""])}});
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
webpackJsonp([13],{"+gXa":function(t,e,s){t.exports=s("dd41")},"RZy/":function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",[s("h2",{attrs:{id:"单例模式"}},[s("a",{staticClass:"anchor",attrs:{href:"#cube-单例模式-anchor","aria-hidden":"true"}},[s("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[s("path",{attrs:{"fill-rule":"evenodd",d:"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"}})])]),t._v(" 单例模式")]),t._v(" "),s("p",[t._v("通过 API 调用组件的时候,需要涉及到组件的单例、多例模式。如果说组件是单例的,在多次实例化的时候,只有一个实例,对应的视图层也只存在一份;如果说组件是多例的,那么每次实例化的时候都会产生一个新的实例,且对应的视图也是有多份的,它们之间互不影响。")]),t._v(" "),s("p",[t._v("在 cube-ui 中涉及到 API 调用的组件都是弹层类,经常使用的如下:")]),t._v(" "),t._m(0),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),s("p",[t._v("在一般情况下,默认行为即可满足需求,除非特殊场景。")]),t._v(" "),t._m(4)])},staticRenderFns:[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("a",{attrs:{href:"#/zh-CN/docs/toast"}},[t._v("Toast 提醒")])]),t._v(" "),s("li",[s("a",{attrs:{href:"#/zh-CN/docs/picker"}},[t._v("Picker 选择器")])]),t._v(" "),s("li",[s("a",{attrs:{href:"#/zh-CN/docs/time-picker"}},[t._v("TimePicker 时间选择器")])]),t._v(" "),s("li",[s("a",{attrs:{href:"#/zh-CN/docs/dialog"}},[t._v("Dialog 弹框")])]),t._v(" "),s("li",[s("a",{attrs:{href:"#/zh-CN/docs/action-sheet"}},[t._v("ActionSheet 操作菜单")])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("所有的 API 调用都是使用 "),s("a",{attrs:{href:"#/zh-CN/docs/create-api"}},[t._v("create-api")]),t._v(" 模块暴露出的 "),s("code",{pre:!0},[t._v("createAPI")]),t._v(" 函数实现,在定义的时候就决定了该组件是否是单例的,详见 "),s("a",{attrs:{href:"#/zh-CN/docs/create-api"}},[t._v("create-api")]),t._v(" 文档。")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("默认情况下,Toast、Dialog 以及 ActionSheet 是单例的,而 Picker 和 TimePicker 是多例的,因为其场景往往比较复杂,有很多额外的数据处理操作,所以是多例的。如果你想在实例化的时候改变默认行为,可以通过设定 "),s("code",{pre:!0},[t._v("$createX")]),t._v(" 的参数中去修改,例如把 Dialog 改为多例的:")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("pre",{pre:!0},[s("code",{attrs:{"v-pre":"",class:"language-js"}},[s("span",{attrs:{class:"hljs-keyword"}},[t._v("const")]),t._v(" dialog = "),s("span",{attrs:{class:"hljs-keyword"}},[t._v("this")]),t._v(".$createDialog({\n "),s("span",{attrs:{class:"hljs-attr"}},[t._v("type")]),t._v(": "),s("span",{attrs:{class:"hljs-string"}},[t._v("'confirm'")]),t._v(",\n "),s("span",{attrs:{class:"hljs-attr"}},[t._v("title")]),t._v(": "),s("span",{attrs:{class:"hljs-string"}},[t._v("'title'")]),t._v(",\n "),s("span",{attrs:{class:"hljs-attr"}},[t._v("content")]),t._v(": "),s("span",{attrs:{class:"hljs-string"}},[t._v("'content'")]),t._v("\n}, "),s("span",{attrs:{class:"hljs-literal"}},[t._v("false")]),t._v(")\ndialog.show()\n")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[s("strong",[t._v("注:")]),t._v(" 限于 Picker 和 TimePicker 的场景,不支持单例模式。")])}]}},dd41:function(t,e,s){var a=s("VU/8")(null,s("RZy/"),null,null,null);t.exports=a.exports}});
\ No newline at end of file
webpackJsonp([13],{"+gXa":function(t,e,s){t.exports=s("dd41")},"Bok/":function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("section",[s("h2",{attrs:{id:"单例模式"}},[s("a",{staticClass:"anchor",attrs:{href:"#cube-单例模式-anchor","aria-hidden":"true"}},[s("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[s("path",{attrs:{"fill-rule":"evenodd",d:"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"}})])]),t._v(" 单例模式")]),t._v(" "),s("p",[t._v("通过 API 调用组件的时候,需要涉及到组件的单例、多例模式。如果说组件是单例的,在多次实例化的时候,只有一个实例,对应的视图层也只存在一份;如果说组件是多例的,那么每次实例化的时候都会产生一个新的实例,且对应的视图也是有多份的,它们之间互不影响。")]),t._v(" "),s("p",[t._v("在 cube-ui 中涉及到 API 调用的组件都是弹层类,经常使用的如下:")]),t._v(" "),t._m(0),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),s("p",[t._v("在一般情况下,默认行为即可满足需求,除非特殊场景。")]),t._v(" "),t._m(4)])},staticRenderFns:[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("a",{attrs:{href:"#/zh-CN/docs/toast"}},[t._v("Toast 提醒")])]),t._v(" "),s("li",[s("a",{attrs:{href:"#/zh-CN/docs/picker"}},[t._v("Picker 选择器")])]),t._v(" "),s("li",[s("a",{attrs:{href:"#/zh-CN/docs/time-picker"}},[t._v("TimePicker 时间选择器")])]),t._v(" "),s("li",[s("a",{attrs:{href:"#/zh-CN/docs/dialog"}},[t._v("Dialog 弹框")])]),t._v(" "),s("li",[s("a",{attrs:{href:"#/zh-CN/docs/action-sheet"}},[t._v("ActionSheet 操作菜单")])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("所有的 API 调用都是使用 "),s("a",{attrs:{href:"#/zh-CN/docs/create-api"}},[t._v("create-api")]),t._v(" 模块暴露出的 "),s("code",{pre:!0},[t._v("createAPI")]),t._v(" 函数实现,在定义的时候就决定了该组件是否是单例的,详见 "),s("a",{attrs:{href:"#/zh-CN/docs/create-api"}},[t._v("create-api")]),t._v(" 文档。")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("默认情况下,Toast、Dialog 以及 ActionSheet 是单例的,而 Picker 和 TimePicker 是多例的,因为其场景往往比较复杂,有很多额外的数据处理操作,所以是多例的。如果你想在实例化的时候改变默认行为,可以通过设定 "),s("code",{pre:!0},[t._v("$createX")]),t._v(" 的参数中去修改,例如把 Dialog 改为多例的:")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("pre",{pre:!0},[s("code",{attrs:{"v-pre":"",class:"language-js"}},[s("span",{attrs:{class:"hljs-keyword"}},[t._v("const")]),t._v(" dialog = "),s("span",{attrs:{class:"hljs-keyword"}},[t._v("this")]),t._v(".$createDialog({\n "),s("span",{attrs:{class:"hljs-attr"}},[t._v("type")]),t._v(": "),s("span",{attrs:{class:"hljs-string"}},[t._v("'confirm'")]),t._v(",\n "),s("span",{attrs:{class:"hljs-attr"}},[t._v("title")]),t._v(": "),s("span",{attrs:{class:"hljs-string"}},[t._v("'title'")]),t._v(",\n "),s("span",{attrs:{class:"hljs-attr"}},[t._v("content")]),t._v(": "),s("span",{attrs:{class:"hljs-string"}},[t._v("'content'")]),t._v("\n}, "),s("span",{attrs:{class:"hljs-literal"}},[t._v("false")]),t._v(")\ndialog.show()\n")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[s("strong",[t._v("注:")]),t._v(" 限于 Picker 和 TimePicker 的场景,不支持单例模式。")])}]}},dd41:function(t,e,s){var a=s("VU/8")(null,s("Bok/"),null,null,null);t.exports=a.exports}});
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
webpackJsonp([23],{"4qzo":function(s,t,a){var e=a("VU/8")(null,a("GDi5"),null,null,null);s.exports=e.exports},GDi5:function(s,t){s.exports={render:function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("section",[a("h2",{attrs:{id:"Loading"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Loading-anchor","aria-hidden":"true"}},[a("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[a("path",{attrs:{"fill-rule":"evenodd",d:"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"}})])]),s._v(" Loading")]),s._v(" "),a("p",[s._v("加载,提供了可自定义大小的加载动画。")]),s._v(" "),a("h3",{attrs:{id:"示例"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-示例-anchor","aria-hidden":"true"}},[a("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[a("path",{attrs:{"fill-rule":"evenodd",d:"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"}})])]),s._v(" 示例")]),s._v(" "),s._m(0),s._v(" "),a("h3",{attrs:{id:"Props配置"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Props配置-anchor","aria-hidden":"true"}},[a("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[a("path",{attrs:{"fill-rule":"evenodd",d:"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"}})])]),s._v(" Props 配置")]),s._v(" "),s._m(1)])},staticRenderFns:[function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ul",[a("li",[a("p",[s._v("图标大小")]),s._v(" "),a("p",[s._v("默认大小为"),a("code",{pre:!0},[s._v("24px")]),s._v(",可通过"),a("code",{pre:!0},[s._v("size")]),s._v("属性配置")]),s._v(" "),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-html"}},[a("span",{attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-loading")]),s._v(">")]),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-loading")]),s._v(">")]),s._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-loading")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v(":size")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"28"')]),s._v(">")]),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-loading")]),s._v(">")]),s._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-loading")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v(":size")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"40"')]),s._v(">")]),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-loading")]),s._v(">")]),s._v("\n")])])])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("table",[a("thead",[a("tr",[a("th",[s._v("参数")]),s._v(" "),a("th",[s._v("说明")]),s._v(" "),a("th",[s._v("类型")]),s._v(" "),a("th",[s._v("默认值")])])]),s._v(" "),a("tbody",[a("tr",[a("td",[s._v("size")]),s._v(" "),a("td",[s._v("加载图标的大小,单位px")]),s._v(" "),a("td",[s._v("Number")]),s._v(" "),a("td",[s._v("24")])])])])}]}},dNW6:function(s,t,a){s.exports=a("4qzo")}});
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
webpackJsonp([49],{"46l0":function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("h2",{attrs:{id:"SingletonPattern"}},[n("a",{staticClass:"anchor",attrs:{href:"#cube-SingletonPattern-anchor","aria-hidden":"true"}},[n("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[n("path",{attrs:{"fill-rule":"evenodd",d:"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"}})])]),e._v(" Singleton Pattern")]),e._v(" "),n("p",[e._v("You need to take the singleton and multiton pattern of components into account when invoking the component by API. If the component is singleton, then there will be only one instance when instantiating it multiple times, and there is only one corresponding view layer; If the component is multiton, then a new instance will be created each time you instantiate it, and there are multiple corresponding view layers which don't affect each other.")]),e._v(" "),n("p",[e._v("The components that are involved with api-invoking in cube-ui are all popups. Frequently used ones among them are listed below:")]),e._v(" "),e._m(0),e._v(" "),e._m(1),e._v(" "),e._m(2),e._v(" "),e._m(3),e._v(" "),n("p",[e._v("In general cases, default behavior can meet the demand, except you have special need.")]),e._v(" "),e._m(4)])},staticRenderFns:[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ul",[n("li",[n("a",{attrs:{href:"#/en-US/docs/toast"}},[e._v("Toast")])]),e._v(" "),n("li",[n("a",{attrs:{href:"#/en-US/docs/picker"}},[e._v("Picker")])]),e._v(" "),n("li",[n("a",{attrs:{href:"#/en-US/docs/time-picker"}},[e._v("TimePicker")])]),e._v(" "),n("li",[n("a",{attrs:{href:"#/en-US/docs/dialog"}},[e._v("Dialog")])]),e._v(" "),n("li",[n("a",{attrs:{href:"#/en-US/docs/action-sheet"}},[e._v("ActionSheet")])])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[e._v("All the api-invokings are implemented with the "),n("code",{pre:!0},[e._v("createAPI")]),e._v(" function exported by the "),n("a",{attrs:{href:"#/en-US/docs/create-api"}},[e._v("create-api")]),e._v(" module. It is decided whether the component is singleton in definition. See details in "),n("a",{attrs:{href:"#/en-US/docs/create-api"}},[e._v("create-api")]),e._v(".")])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[e._v("By default, Toast, Dialog and ActionSheet is singleton, while Picker and TimePicker is multiton because their scenes tend to be more complex with a lot of extra data processing. If you want to change the default behavior at the time of instantiation,you can modify the parameter of "),n("code",{pre:!0},[e._v("$createX")]),e._v(". For example, we change the Dialog into multiton:")])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("pre",{pre:!0},[n("code",{attrs:{"v-pre":"",class:"language-js"}},[n("span",{attrs:{class:"hljs-keyword"}},[e._v("const")]),e._v(" dialog = "),n("span",{attrs:{class:"hljs-keyword"}},[e._v("this")]),e._v(".$createDialog({\n "),n("span",{attrs:{class:"hljs-attr"}},[e._v("type")]),e._v(": "),n("span",{attrs:{class:"hljs-string"}},[e._v("'confirm'")]),e._v(",\n "),n("span",{attrs:{class:"hljs-attr"}},[e._v("title")]),e._v(": "),n("span",{attrs:{class:"hljs-string"}},[e._v("'title'")]),e._v(",\n "),n("span",{attrs:{class:"hljs-attr"}},[e._v("content")]),e._v(": "),n("span",{attrs:{class:"hljs-string"}},[e._v("'content'")]),e._v("\n}, "),n("span",{attrs:{class:"hljs-literal"}},[e._v("false")]),e._v(")\ndialog.show()\n")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[n("strong",[e._v("Note:")]),e._v(" Considering the scenes of Picker and TimePicker, neither of them support singleton pattern.")])}]}},"7KpM":function(e,t,n){var a=n("VU/8")(null,n("46l0"),null,null,null);e.exports=a.exports},AoaZ:function(e,t,n){e.exports=n("7KpM")}});
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册