提交 d7f2c565 编写于 作者: D dolymood

docs build

上级 b274363e
<!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.4029998b71926e58f4adfe14bf6c2505.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=js/manifest.f8c3b84d1677640e6f73.js></script><script type=text/javascript src=js/vendor.a06130c32d656889778e.js></script><script type=text/javascript src=js/app.56e772291f90a39ba7f9.js></script></body></html> <!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.de2ee7d9e58746e3d906ad5fa1e9fbff.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=js/manifest.c2454d509a2f7c3ab1fb.js></script><script type=text/javascript src=js/vendor.3eefa8a741e4341f499f.js></script><script type=text/javascript src=js/app.c18aa8cfe1af4ff75c88.js></script></body></html>
\ No newline at end of file \ No newline at end of file
此差异已折叠。
此差异已折叠。
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,a,c){for(var u,i,f,s=0,l=[];s<t.length;s++)i=t[s],o[i]&&l.push(o[i][0]),o[i]=0;for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&(e[u]=a[u]);for(r&&r(t,a,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)f=n(n.s=c[s]);return f};var t={},o={2:0};n.e=function(e){function r(){u.onerror=u.onload=null,clearTimeout(i);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var a=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=a;var c=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,n.nc&&u.setAttribute("nonce",n.nc),u.src=n.p+"js/"+e+"."+{0:"56e772291f90a39ba7f9",1:"a06130c32d656889778e"}[e]+".js";var i=setTimeout(r,12e4);return u.onerror=u.onload=r,c.appendChild(u),a},n.m=e,n.c=t,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n.oe=function(e){throw console.error(e),e}}([]); !function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,a,c){for(var u,i,f,s=0,l=[];s<t.length;s++)i=t[s],o[i]&&l.push(o[i][0]),o[i]=0;for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&(e[u]=a[u]);for(r&&r(t,a,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)f=n(n.s=c[s]);return f};var t={},o={2:0};n.e=function(e){function r(){u.onerror=u.onload=null,clearTimeout(i);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var a=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=a;var c=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,n.nc&&u.setAttribute("nonce",n.nc),u.src=n.p+"js/"+e+"."+{0:"c18aa8cfe1af4ff75c88",1:"3eefa8a741e4341f499f"}[e]+".js";var i=setTimeout(r,12e4);return u.onerror=u.onload=r,c.appendChild(u),a},n.m=e,n.c=t,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file \ 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><title>cube-ui Document</title><link href=/cube-ui/css/app.b0b31d9d575ebd073bdb44d2fa95d57d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/cube-ui/js/manifest.b0ba55f015921c68c9a9.js></script><script type=text/javascript src=/cube-ui/js/vendor.498a730358451511c942.js></script><script type=text/javascript src=/cube-ui/js/app.778739529cf74f2b1890.js></script></body></html> <!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><title>cube-ui Document</title><link href=/cube-ui/css/app.b0b31d9d575ebd073bdb44d2fa95d57d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/cube-ui/js/manifest.01fe85439950ffc19b75.js></script><script type=text/javascript src=/cube-ui/js/vendor.5a633df6f18ef18093a7.js></script><script type=text/javascript src=/cube-ui/js/app.97ab88474db21dc12242.js></script></body></html>
\ No newline at end of file \ 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")("e0abb45c",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([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([1],{"+GB6":function(e,t,n){function o(e){n("1E72")}var r=n("VU/8")(n("ICiJ"),n("8iZ+"),o,null,null);e.exports=r.exports},"1E72":function(e,t,n){var o=n("H+bZ");"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);n("rjj0")("4e79e8f8",o,!0)},"8iZ+":function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("viewport",{attrs:{lang:"en-US"}})},staticRenderFns:[]}},"H+bZ":function(e,t,n){t=e.exports=n("FZ+f")(!1),t.push([e.i,"",""])},ICiJ:function(e,t,n){var o,r,i;!function(u,s){r=[e,t,n("YKRY")],o=s,void 0!==(i="function"==typeof o?o.apply(t,r):o)&&(e.exports=i)}(0,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={components:{Viewport:o.default}},e.exports=t.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")},"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}}); 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 \ No newline at end of file
webpackJsonp([14],{Arul:function(t,s,v){var a=v("VU/8")(null,v("auGc"),null,null,null);t.exports=a.exports},auGc:function(t,s){t.exports={render:function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("section",[v("h2",{attrs:{id:"Select"}},[v("a",{staticClass:"anchor",attrs:{href:"#cube-Select-anchor","aria-hidden":"true"}},[v("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[v("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(" Select")]),t._v(" "),v("p",[t._v("Select 组件,用于单项选择。")]),t._v(" "),t._m(0),t._v(" "),v("h3",{attrs:{id:"示例"}},[v("a",{staticClass:"anchor",attrs:{href:"#cube-示例-anchor","aria-hidden":"true"}},[v("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[v("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(" "),t._m(1),t._v(" "),v("h3",{attrs:{id:"Props配置"}},[v("a",{staticClass:"anchor",attrs:{href:"#cube-Props配置-anchor","aria-hidden":"true"}},[v("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[v("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(" Props 配置")]),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),v("p",[t._v("你可以将每个选项定义成一个对象,其中 text 为选项文案,value为选项的值,若没有将该选项定义为对象,比如 2014,则我们内部会把它转化成 { value: 2014, text: 2014 }")]),t._v(" "),v("h3",{attrs:{id:"事件"}},[v("a",{staticClass:"anchor",attrs:{href:"#cube-事件-anchor","aria-hidden":"true"}},[v("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[v("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(" "),t._m(5)])},staticRenderFns:[function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("p",[v("strong",[t._v("注:")]),t._v(" 由于此组件依赖 "),v("a",{attrs:{href:"#/zh-CN/docs/picker"}},[t._v("Picker")]),t._v(" 组件,而 Picker 组件是基于 create-api 实现,所以在使用之前,请确保自己了解过 "),v("a",{attrs:{href:"#/zh-CN/docs/create-api"}},[t._v("create-api")]),t._v("")])},function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("ul",[v("li",[v("p",[t._v("基本用法")]),t._v(" "),v("p",[t._v("对于 Select 选择组件,你需要传入 options 定义各个选项,选择的结果则绑定在 v-model 上。")]),t._v(" "),v("pre",{pre:!0},[v("code",{attrs:{"v-pre":"",class:"language-html"}},[v("span",{attrs:{class:"hljs-tag"}},[t._v("<"),v("span",{attrs:{class:"hljs-name"}},[t._v("cube-select")]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"value"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":options")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"options"')]),t._v(">")]),t._v("\n"),v("span",{attrs:{class:"hljs-tag"}},[t._v("</"),v("span",{attrs:{class:"hljs-name"}},[t._v("cube-select")]),t._v(">")]),t._v("\n")])]),t._v(" "),v("pre",{pre:!0},[v("code",{attrs:{"v-pre":"",class:"language-js"}},[v("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),v("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n data() {\n "),v("span",{attrs:{class:"hljs-keyword"}},[t._v("return")]),t._v(" {\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("options")]),t._v(": ["),v("span",{attrs:{class:"hljs-number"}},[t._v("2013")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2014")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2015")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2017")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2018")]),t._v("],\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("value")]),t._v(": "),v("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v("\n }\n }\n}\n")])])]),t._v(" "),v("li",[v("p",[t._v("配置和事件")]),t._v(" "),v("p",[t._v("Select 支持选择器标题(title)、占位符(placeholder)、自动弹出选择器(autoPop)、禁用(disabled)的配置。并且在选择时,如果选择的值改变了,会派发 change 事件。")]),t._v(" "),v("pre",{pre:!0},[v("code",{attrs:{"v-pre":"",class:"language-html"}},[v("span",{attrs:{class:"hljs-tag"}},[t._v("<"),v("span",{attrs:{class:"hljs-name"}},[t._v("cube-select")]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"value"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":title")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"title"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":options")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"options"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":placeholder")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"placeholder"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":auto-pop")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"autoPop"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":disabled")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"disabled"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("@change")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"change"')]),t._v(">")]),t._v("\n"),v("span",{attrs:{class:"hljs-tag"}},[t._v("</"),v("span",{attrs:{class:"hljs-name"}},[t._v("cube-select")]),t._v(">")]),t._v("\n")])]),t._v(" "),v("pre",{pre:!0},[v("code",{attrs:{"v-pre":"",class:"language-js"}},[v("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),v("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n data() {\n "),v("span",{attrs:{class:"hljs-keyword"}},[t._v("return")]),t._v(" {\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("options")]),t._v(": ["),v("span",{attrs:{class:"hljs-number"}},[t._v("2013")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2014")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2015")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2017")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2018")]),t._v("],\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("value")]),t._v(": "),v("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v(",\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("title")]),t._v(": "),v("span",{attrs:{class:"hljs-string"}},[t._v("'入职时间'")]),t._v(",\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("placeholder")]),t._v(": "),v("span",{attrs:{class:"hljs-string"}},[t._v("'请选择入职时间'")]),t._v(",\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("autoPop")]),t._v(": "),v("span",{attrs:{class:"hljs-literal"}},[t._v("false")]),t._v(",\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("disabled")]),t._v(": "),v("span",{attrs:{class:"hljs-literal"}},[t._v("false")]),t._v("\n }\n },\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("methods")]),t._v(": {\n change(value, index, text) {\n "),v("span",{attrs:{class:"hljs-built_in"}},[t._v("console")]),t._v(".log("),v("span",{attrs:{class:"hljs-string"}},[t._v("'change'")]),t._v(", value, index, text)\n }\n }\n}\n")])]),t._v(" "),v("p",[t._v("需要注意的一点是,change 事件在你直接赋值修改 value 的值时,不会触发,只会在选择导致的修改时触发。如果你只是想监听 value 的改变,请直接监听 value。")])])])},function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("table",[v("thead",[v("tr",[v("th",[t._v("参数")]),t._v(" "),v("th",[t._v("说明")]),t._v(" "),v("th",[t._v("类型")]),t._v(" "),v("th",[t._v("可选值")]),t._v(" "),v("th",[t._v("默认值")])])]),t._v(" "),v("tbody",[v("tr",[v("td",[t._v("options")]),t._v(" "),v("td",[t._v("选项")]),t._v(" "),v("td",[t._v("Array")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("[]")])]),t._v(" "),v("tr",[v("td",[t._v("v-model")]),t._v(" "),v("td",[t._v("选中的值")]),t._v(" "),v("td",[t._v("Any")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")])]),t._v(" "),v("tr",[v("td",[t._v("placeholder")]),t._v(" "),v("td",[t._v("占位文案")]),t._v(" "),v("td",[t._v("String")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("'请选择'")])]),t._v(" "),v("tr",[v("td",[t._v("auto-pop")]),t._v(" "),v("td",[t._v("是否自动弹出选择器")]),t._v(" "),v("td",[t._v("Boolean")]),t._v(" "),v("td",[t._v("true/false")]),t._v(" "),v("td",[t._v("false")])]),t._v(" "),v("tr",[v("td",[t._v("disabled")]),t._v(" "),v("td",[t._v("是否禁用")]),t._v(" "),v("td",[t._v("Boolean")]),t._v(" "),v("td",[t._v("true/false")]),t._v(" "),v("td",[t._v("false")])]),t._v(" "),v("tr",[v("td",[t._v("title")]),t._v(" "),v("td",[t._v("选择器的标题")]),t._v(" "),v("td",[t._v("String")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("'请选择'")])]),t._v(" "),v("tr",[v("td",[t._v("cancelTxt")]),t._v(" "),v("td",[t._v("选择器的取消按钮文案")]),t._v(" "),v("td",[t._v("String")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("'取消'")])]),t._v(" "),v("tr",[v("td",[t._v("confirmTxt")]),t._v(" "),v("td",[t._v("选择器的确认按钮文案")]),t._v(" "),v("td",[t._v("String")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("'确认'")])])])])},function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("ul",[v("li",[v("code",{pre:!0},[t._v("options")]),t._v(" 子配置项")])])},function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("table",[v("thead",[v("tr",[v("th",[t._v("参数")]),t._v(" "),v("th",[t._v("说明")]),t._v(" "),v("th",[t._v("类型")]),t._v(" "),v("th",[t._v("可选值")]),t._v(" "),v("th",[t._v("示例")])])]),t._v(" "),v("tbody",[v("tr",[v("td",[t._v("value")]),t._v(" "),v("td",[t._v("该选项的值")]),t._v(" "),v("td",[t._v("Any")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")])]),t._v(" "),v("tr",[v("td",[t._v("text")]),t._v(" "),v("td",[t._v("该选项的文案")]),t._v(" "),v("td",[t._v("String")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")])])])])},function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("table",[v("thead",[v("tr",[v("th",[t._v("事件名")]),t._v(" "),v("th",[t._v("说明")]),t._v(" "),v("th",[t._v("参数1")]),t._v(" "),v("th",[t._v("参数2")]),t._v(" "),v("th",[t._v("参数3")])])]),t._v(" "),v("tbody",[v("tr",[v("td",[t._v("change")]),t._v(" "),v("td",[t._v("在选择时,如果选择的值改变了派发")]),t._v(" "),v("td",[t._v("选中项的值")]),t._v(" "),v("td",[t._v("选中项的索引")]),t._v(" "),v("td",[t._v("选中项的文案")])]),t._v(" "),v("tr",[v("td",[t._v("picker-show")]),t._v(" "),v("td",[t._v("使用的 Picker 显示的时候派发")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")])]),t._v(" "),v("tr",[v("td",[t._v("picker-hide")]),t._v(" "),v("td",[t._v("使用的 Picker 隐藏的时候派发(确定或取消都会派发)")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")])])])])}]}},eM4Z:function(t,s,v){t.exports=v("Arul")}});
\ No newline at end of file
webpackJsonp([14],{Arul:function(t,s,v){var a=v("VU/8")(null,v("pVIV"),null,null,null);t.exports=a.exports},eM4Z:function(t,s,v){t.exports=v("Arul")},pVIV:function(t,s){t.exports={render:function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("section",[v("h2",{attrs:{id:"Select"}},[v("a",{staticClass:"anchor",attrs:{href:"#cube-Select-anchor","aria-hidden":"true"}},[v("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[v("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(" Select")]),t._v(" "),v("p",[t._v("Select 组件,用于单项选择。")]),t._v(" "),t._m(0),t._v(" "),v("h3",{attrs:{id:"示例"}},[v("a",{staticClass:"anchor",attrs:{href:"#cube-示例-anchor","aria-hidden":"true"}},[v("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[v("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(" "),t._m(1),t._v(" "),v("h3",{attrs:{id:"Props配置"}},[v("a",{staticClass:"anchor",attrs:{href:"#cube-Props配置-anchor","aria-hidden":"true"}},[v("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[v("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(" Props 配置")]),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),v("p",[t._v("你可以将每个选项定义成一个对象,其中 text 为选项文案,value为选项的值,若没有将该选项定义为对象,比如 2014,则我们内部会把它转化成 { value: 2014, text: 2014 }")]),t._v(" "),v("h3",{attrs:{id:"事件"}},[v("a",{staticClass:"anchor",attrs:{href:"#cube-事件-anchor","aria-hidden":"true"}},[v("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[v("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(" "),t._m(5)])},staticRenderFns:[function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("p",[v("strong",[t._v("注:")]),t._v(" 由于此组件依赖 "),v("a",{attrs:{href:"#/zh-CN/docs/picker"}},[t._v("Picker")]),t._v(" 组件,而 Picker 组件是基于 create-api 实现,所以在使用之前,请确保自己了解过 "),v("a",{attrs:{href:"#/zh-CN/docs/create-api"}},[t._v("create-api")]),t._v("")])},function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("ul",[v("li",[v("p",[t._v("基本用法")]),t._v(" "),v("p",[t._v("对于 Select 选择组件,你需要传入 options 定义各个选项,选择的结果则绑定在 v-model 上。")]),t._v(" "),v("pre",{pre:!0},[v("code",{attrs:{"v-pre":"",class:"language-html"}},[v("span",{attrs:{class:"hljs-tag"}},[t._v("<"),v("span",{attrs:{class:"hljs-name"}},[t._v("cube-select")]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"value"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":options")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"options"')]),t._v(">")]),t._v("\n"),v("span",{attrs:{class:"hljs-tag"}},[t._v("</"),v("span",{attrs:{class:"hljs-name"}},[t._v("cube-select")]),t._v(">")]),t._v("\n")])]),t._v(" "),v("pre",{pre:!0},[v("code",{attrs:{"v-pre":"",class:"language-js"}},[v("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),v("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n data() {\n "),v("span",{attrs:{class:"hljs-keyword"}},[t._v("return")]),t._v(" {\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("options")]),t._v(": ["),v("span",{attrs:{class:"hljs-number"}},[t._v("2013")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2014")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2015")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2017")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2018")]),t._v("],\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("value")]),t._v(": "),v("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v("\n }\n }\n}\n")])])]),t._v(" "),v("li",[v("p",[t._v("配置和事件")]),t._v(" "),v("p",[t._v("Select 支持选择器标题(title)、占位符(placeholder)、自动弹出选择器(autoPop)、禁用(disabled)的配置。并且在选择时,如果选择的值改变了,会派发 change 事件。")]),t._v(" "),v("pre",{pre:!0},[v("code",{attrs:{"v-pre":"",class:"language-html"}},[v("span",{attrs:{class:"hljs-tag"}},[t._v("<"),v("span",{attrs:{class:"hljs-name"}},[t._v("cube-select")]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"value"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":title")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"title"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":options")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"options"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":placeholder")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"placeholder"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":auto-pop")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"autoPop"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v(":disabled")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"disabled"')]),t._v("\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("@change")]),t._v("="),v("span",{attrs:{class:"hljs-string"}},[t._v('"change"')]),t._v(">")]),t._v("\n"),v("span",{attrs:{class:"hljs-tag"}},[t._v("</"),v("span",{attrs:{class:"hljs-name"}},[t._v("cube-select")]),t._v(">")]),t._v("\n")])]),t._v(" "),v("pre",{pre:!0},[v("code",{attrs:{"v-pre":"",class:"language-js"}},[v("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),v("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n data() {\n "),v("span",{attrs:{class:"hljs-keyword"}},[t._v("return")]),t._v(" {\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("options")]),t._v(": ["),v("span",{attrs:{class:"hljs-number"}},[t._v("2013")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2014")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2015")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2017")]),t._v(", "),v("span",{attrs:{class:"hljs-number"}},[t._v("2018")]),t._v("],\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("value")]),t._v(": "),v("span",{attrs:{class:"hljs-number"}},[t._v("2016")]),t._v(",\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("title")]),t._v(": "),v("span",{attrs:{class:"hljs-string"}},[t._v("'入职时间'")]),t._v(",\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("placeholder")]),t._v(": "),v("span",{attrs:{class:"hljs-string"}},[t._v("'请选择入职时间'")]),t._v(",\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("autoPop")]),t._v(": "),v("span",{attrs:{class:"hljs-literal"}},[t._v("false")]),t._v(",\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("disabled")]),t._v(": "),v("span",{attrs:{class:"hljs-literal"}},[t._v("false")]),t._v("\n }\n },\n "),v("span",{attrs:{class:"hljs-attr"}},[t._v("methods")]),t._v(": {\n change(value, index, text) {\n "),v("span",{attrs:{class:"hljs-built_in"}},[t._v("console")]),t._v(".log("),v("span",{attrs:{class:"hljs-string"}},[t._v("'change'")]),t._v(", value, index, text)\n }\n }\n}\n")])]),t._v(" "),v("p",[t._v("需要注意的一点是,change 事件在你直接赋值修改 value 的值时,不会触发,只会在选择导致的修改时触发。如果你只是想监听 value 的改变,请直接监听 value。")])])])},function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("table",[v("thead",[v("tr",[v("th",[t._v("参数")]),t._v(" "),v("th",[t._v("说明")]),t._v(" "),v("th",[t._v("类型")]),t._v(" "),v("th",[t._v("可选值")]),t._v(" "),v("th",[t._v("默认值")])])]),t._v(" "),v("tbody",[v("tr",[v("td",[t._v("options")]),t._v(" "),v("td",[t._v("选项")]),t._v(" "),v("td",[t._v("Array")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("[]")])]),t._v(" "),v("tr",[v("td",[t._v("v-model")]),t._v(" "),v("td",[t._v("选中的值")]),t._v(" "),v("td",[t._v("Any")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")])]),t._v(" "),v("tr",[v("td",[t._v("placeholder")]),t._v(" "),v("td",[t._v("占位文案")]),t._v(" "),v("td",[t._v("String")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("'请选择'")])]),t._v(" "),v("tr",[v("td",[t._v("auto-pop")]),t._v(" "),v("td",[t._v("是否自动弹出选择器")]),t._v(" "),v("td",[t._v("Boolean")]),t._v(" "),v("td",[t._v("true/false")]),t._v(" "),v("td",[t._v("false")])]),t._v(" "),v("tr",[v("td",[t._v("disabled")]),t._v(" "),v("td",[t._v("是否禁用")]),t._v(" "),v("td",[t._v("Boolean")]),t._v(" "),v("td",[t._v("true/false")]),t._v(" "),v("td",[t._v("false")])]),t._v(" "),v("tr",[v("td",[t._v("title")]),t._v(" "),v("td",[t._v("选择器的标题")]),t._v(" "),v("td",[t._v("String")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("'请选择'")])]),t._v(" "),v("tr",[v("td",[t._v("cancelTxt")]),t._v(" "),v("td",[t._v("选择器的取消按钮文案")]),t._v(" "),v("td",[t._v("String")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("'取消'")])]),t._v(" "),v("tr",[v("td",[t._v("confirmTxt")]),t._v(" "),v("td",[t._v("选择器的确认按钮文案")]),t._v(" "),v("td",[t._v("String")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("'确认'")])])])])},function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("ul",[v("li",[v("code",{pre:!0},[t._v("options")]),t._v(" 子配置项")])])},function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("table",[v("thead",[v("tr",[v("th",[t._v("参数")]),t._v(" "),v("th",[t._v("说明")]),t._v(" "),v("th",[t._v("类型")]),t._v(" "),v("th",[t._v("可选值")]),t._v(" "),v("th",[t._v("示例")])])]),t._v(" "),v("tbody",[v("tr",[v("td",[t._v("value")]),t._v(" "),v("td",[t._v("该选项的值")]),t._v(" "),v("td",[t._v("Any")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")])]),t._v(" "),v("tr",[v("td",[t._v("text")]),t._v(" "),v("td",[t._v("该选项的文案")]),t._v(" "),v("td",[t._v("String")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")])])])])},function(){var t=this,s=t.$createElement,v=t._self._c||s;return v("table",[v("thead",[v("tr",[v("th",[t._v("事件名")]),t._v(" "),v("th",[t._v("说明")]),t._v(" "),v("th",[t._v("参数1")]),t._v(" "),v("th",[t._v("参数2")]),t._v(" "),v("th",[t._v("参数3")])])]),t._v(" "),v("tbody",[v("tr",[v("td",[t._v("change")]),t._v(" "),v("td",[t._v("在选择时,如果选择的值改变了派发")]),t._v(" "),v("td",[t._v("选中项的值")]),t._v(" "),v("td",[t._v("选中项的索引")]),t._v(" "),v("td",[t._v("选中项的文案")])]),t._v(" "),v("tr",[v("td",[t._v("picker-show")]),t._v(" "),v("td",[t._v("使用的 Picker 显示的时候派发")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")])]),t._v(" "),v("tr",[v("td",[t._v("picker-hide")]),t._v(" "),v("td",[t._v("使用的 Picker 隐藏的时候派发(确定或取消都会派发)")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")]),t._v(" "),v("td",[t._v("-")])])])])}]}}});
\ No newline at end of file
此差异已折叠。
webpackJsonp([15],{CiMa: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:"SegmentPicker组件"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-SegmentPicker组件-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(" SegmentPicker 组件")]),s._v(" "),a("p",[s._v("段选择器,用于实现多段的选择,比如选择时间段:2010年9月1日 - 2014年6月30日。")]),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),s._v(" "),s._m(2),s._v(" "),s._m(3),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(4),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(5)])},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("data")]),s._v(" 属性定义每个节点选择器的类型和属性,"),a("code",{pre:!0},[s._v("is")]),s._v(" 代表该选择器是用哪种 Picker 组件,既可以是 Cube UI 的 Picker 类组件,也可以是你自己定义的 Picker 组件。比如下面是我们用两个 DatePicker 组件来做时间段选择。")]),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-button")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("@click")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"showDateSegmentPicker"')]),s._v(">")]),s._v("StartDate - EndDate"),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-button")]),s._v(">")]),s._v("\n")])]),s._v(" "),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-js"}},[a("span",{attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" dateSegmentData = [\n {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("is")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cube-date-picker'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("title")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'入学时间'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("min")]),s._v(": "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" "),a("span",{attrs:{class:"hljs-built_in"}},[s._v("Date")]),s._v("("),a("span",{attrs:{class:"hljs-number"}},[s._v("2000")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("1")]),s._v("),\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("max")]),s._v(": "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" "),a("span",{attrs:{class:"hljs-built_in"}},[s._v("Date")]),s._v("("),a("span",{attrs:{class:"hljs-number"}},[s._v("2030")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("11")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("31")]),s._v(")\n },\n {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("is")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cube-date-picker'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("title")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'毕业时间'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("min")]),s._v(": "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" "),a("span",{attrs:{class:"hljs-built_in"}},[s._v("Date")]),s._v("("),a("span",{attrs:{class:"hljs-number"}},[s._v("2000")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("1")]),s._v("),\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("max")]),s._v(": "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" "),a("span",{attrs:{class:"hljs-built_in"}},[s._v("Date")]),s._v("("),a("span",{attrs:{class:"hljs-number"}},[s._v("2030")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("11")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("31")]),s._v(")\n }\n]\n\n"),a("span",{attrs:{class:"hljs-keyword"}},[s._v("export")]),s._v(" "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("default")]),s._v(" {\n mounted () {\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("this")]),s._v(".dateSegmentPicker = "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("this")]),s._v(".$createSegmentPicker({\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("data")]),s._v(": dateSegmentData,\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("onSelect")]),s._v(": "),a("span",{attrs:{class:"hljs-function"}},[s._v("("),a("span",{attrs:{class:"hljs-params"}},[s._v("selectedDates, selectedVals, selectedTexts")]),s._v(") =>")]),s._v(" {\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("this")]),s._v(".$createDialog({\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("type")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'warn'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("content")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("`Selected Items: <br/> - 入学时间: "),a("span",{attrs:{class:"hljs-subst"}},[s._v("${selectedTexts["),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v("].join("),a("span",{attrs:{class:"hljs-string"}},[s._v("''")]),s._v(")}")]),s._v(" <br/> - 毕业时间: "),a("span",{attrs:{class:"hljs-subst"}},[s._v("${selectedTexts["),a("span",{attrs:{class:"hljs-number"}},[s._v("1")]),s._v("].join("),a("span",{attrs:{class:"hljs-string"}},[s._v("''")]),s._v(")}")]),s._v("`")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("icon")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cubeic-alert'")]),s._v("\n }).show()\n },\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("onNext")]),s._v(": "),a("span",{attrs:{class:"hljs-function"}},[s._v("("),a("span",{attrs:{class:"hljs-params"}},[s._v("i, selectedDate, selectedValue, selectedText")]),s._v(") =>")]),s._v(" {\n dateSegmentData["),a("span",{attrs:{class:"hljs-number"}},[s._v("1")]),s._v("].min = selectedDate\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("if")]),s._v(" (i === "),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v(") {\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("this")]),s._v(".dateSegmentPicker.$updateProps({\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("data")]),s._v(": dateSegmentData\n })\n }\n }\n })\n },\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("methods")]),s._v(": {\n showDateSegmentPicker() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("this")]),s._v(".dateSegmentPicker.show()\n }\n }\n}\n")])]),s._v(" "),a("p",[s._v("并且为了实现两个选择器之间的联动,我们可以在 next 下一步的事件处理函数中,根据第一个的选择,更新第二个选择器,比如这里是,将结束时间的最小值 = 所选的开始时间。")])]),s._v(" "),a("li",[a("p",[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-button")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("@click")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"showCitySegmentPicker"')]),s._v(">")]),s._v("Express - From - To"),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-button")]),s._v(">")]),s._v("\n")])]),s._v(" "),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-js"}},[a("span",{attrs:{class:"hljs-keyword"}},[s._v("import")]),s._v(" { provinceList, cityList, areaList } "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("from")]),s._v(" "),a("span",{attrs:{class:"hljs-string"}},[s._v("'example/data/area'")]),s._v("\n\n"),a("span",{attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" cityData = provinceList\ncityData.forEach("),a("span",{attrs:{class:"hljs-function"}},[a("span",{attrs:{class:"hljs-params"}},[s._v("province")]),s._v(" =>")]),s._v(" {\n province.children = cityList[province.value]\n province.children.forEach("),a("span",{attrs:{class:"hljs-function"}},[a("span",{attrs:{class:"hljs-params"}},[s._v("city")]),s._v(" =>")]),s._v(" {\n city.children = areaList[city.value]\n })\n})\n\n"),a("span",{attrs:{class:"hljs-keyword"}},[s._v("export")]),s._v(" "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("default")]),s._v(" {\n mounted () {\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("this")]),s._v(".citySegmentPicker = "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("this")]),s._v(".$createSegmentPicker({\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("data")]),s._v(": [{\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("title")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'选择快递'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("data")]),s._v(": [expressData],\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("selectedIndex")]),s._v(": ["),a("span",{attrs:{class:"hljs-number"}},[s._v("1")]),s._v("]\n }, {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("is")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cube-cascade-picker'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("title")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'寄件地址'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("data")]),s._v(": cityData,\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("selectedIndex")]),s._v(": ["),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v("],\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("cancelTxt")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'返回'")]),s._v("\n }, {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("is")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cube-cascade-picker'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("title")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'收件地址'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("data")]),s._v(": cityData,\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("selectedIndex")]),s._v(": ["),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v(", "),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v("]\n }],\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("cancelTxt")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'Cancel'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("confirmTxt")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'Confirm'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("nextTxt")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'Next'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("prevTxt")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'Prev'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("onSelect")]),s._v(": "),a("span",{attrs:{class:"hljs-function"}},[s._v("("),a("span",{attrs:{class:"hljs-params"}},[s._v("selectedVals, selectedIndexs, selectedTexts")]),s._v(") =>")]),s._v(" {\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("this")]),s._v(".$createDialog({\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("type")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'warn'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("content")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("`Selected Items: <br/> - 所选快递: "),a("span",{attrs:{class:"hljs-subst"}},[s._v("${selectedTexts["),a("span",{attrs:{class:"hljs-number"}},[s._v("0")]),s._v("].join("),a("span",{attrs:{class:"hljs-string"}},[s._v("''")]),s._v(")}")]),s._v(" <br/> - 寄件地址: "),a("span",{attrs:{class:"hljs-subst"}},[s._v("${selectedTexts["),a("span",{attrs:{class:"hljs-number"}},[s._v("1")]),s._v("].join("),a("span",{attrs:{class:"hljs-string"}},[s._v("''")]),s._v(")}")]),s._v(" <br/> - 收件地址: "),a("span",{attrs:{class:"hljs-subst"}},[s._v("${selectedTexts["),a("span",{attrs:{class:"hljs-number"}},[s._v("2")]),s._v("].join("),a("span",{attrs:{class:"hljs-string"}},[s._v("''")]),s._v(")}")]),s._v("`")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("icon")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cubeic-alert'")]),s._v("\n }).show()\n }\n })\n },\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("methods")]),s._v(": {\n showCitySegmentPicker() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("this")]),s._v(".citySegmentPicker.show()\n }\n }\n}\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("th",[s._v("示例")])])]),s._v(" "),a("tbody",[a("tr",[a("td",[s._v("data")]),s._v(" "),a("td",[s._v("定义各个选择器的组件名和属性")]),s._v(" "),a("td",[s._v("Array")]),s._v(" "),a("td",[s._v("[]")]),s._v(" "),a("td",[s._v("-")])]),s._v(" "),a("tr",[a("td",[s._v("title")]),s._v(" "),a("td",[s._v("标题")]),s._v(" "),a("td",[s._v("String")]),s._v(" "),a("td",[s._v("''")]),s._v(" "),a("td",[s._v("-")])]),s._v(" "),a("tr",[a("td",[s._v("cancelTxt")]),s._v(" "),a("td",[s._v("取消按钮文案")]),s._v(" "),a("td",[s._v("String")]),s._v(" "),a("td",[s._v("'取消'")]),s._v(" "),a("td",[s._v("-")])]),s._v(" "),a("tr",[a("td",[s._v("confirmTxt")]),s._v(" "),a("td",[s._v("确定按钮文案")]),s._v(" "),a("td",[s._v("String")]),s._v(" "),a("td",[s._v("'确定'")]),s._v(" "),a("td",[s._v("-")])]),s._v(" "),a("tr",[a("td",[s._v("nextTxt")]),s._v(" "),a("td",[s._v("下一步按钮文案")]),s._v(" "),a("td",[s._v("String")]),s._v(" "),a("td",[s._v("'下一步'")]),s._v(" "),a("td",[s._v("-")])]),s._v(" "),a("tr",[a("td",[s._v("prevTxt")]),s._v(" "),a("td",[s._v("上一步按钮文案")]),s._v(" "),a("td",[s._v("String")]),s._v(" "),a("td",[s._v("'下一步'")]),s._v(" "),a("td",[s._v("-")])])])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ul",[a("li",[a("code",{pre:!0},[s._v("data")]),s._v(" 子配置项")])])},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("th",[s._v("示例")])])]),s._v(" "),a("tbody",[a("tr",[a("td",[s._v("is")]),s._v(" "),a("td",[s._v("该节点选择器的组件名")]),s._v(" "),a("td",[s._v("String")]),s._v(" "),a("td",[s._v("cube-picker")]),s._v(" "),a("td",[s._v("cube-date-picker")])]),s._v(" "),a("tr",[a("td",[s._v("其它")]),s._v(" "),a("td",[s._v("该节点选择器的属性")]),s._v(" "),a("td",[s._v("-")]),s._v(" "),a("td",[s._v("-")]),s._v(" "),a("td",[s._v("-")])])])])},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("参数1")]),s._v(" "),a("th",[s._v("参数2")]),s._v(" "),a("th",[s._v("参数3")])])]),s._v(" "),a("tbody",[a("tr",[a("td",[s._v("select")]),s._v(" "),a("td",[s._v("点击确认按钮触发此事件")]),s._v(" "),a("td",[s._v("各个选择器的 select 事件的参数1,Array 类型")]),s._v(" "),a("td",[s._v("各个选择器的 select 事件的参数2,Array 类型")]),s._v(" "),a("td",[s._v("各个选择器的 select 事件的参数3,Array 类型")])]),s._v(" "),a("tr",[a("td",[s._v("cancel")]),s._v(" "),a("td",[s._v("点击取消按钮触发此事件")]),s._v(" "),a("td",[s._v("-")]),s._v(" "),a("td",[s._v("-")]),s._v(" "),a("td",[s._v("-")])]),s._v(" "),a("tr",[a("td",[s._v("next")]),s._v(" "),a("td",[s._v("点击下一步按钮触发此事件")]),s._v(" "),a("td",[s._v("当前 picker 的索引,Number类型")]),s._v(" "),a("td",[s._v("其余参数为,当前 picker select 时间的参数")]),s._v(" "),a("td",[s._v("···")])]),s._v(" "),a("tr",[a("td",[s._v("prev")]),s._v(" "),a("td",[s._v("点击上一步按钮触发此事件")]),s._v(" "),a("td",[s._v("当前 picker 的索引,Number类型")]),s._v(" "),a("td",[s._v("-")]),s._v(" "),a("td",[s._v("-")])]),s._v(" "),a("tr",[a("td",[s._v("change")]),s._v(" "),a("td",[s._v("滚轴滚动后触发此事件")]),s._v(" "),a("td",[s._v("pickerIndex: 当前滚动 picker 的索引,Number类型")]),s._v(" "),a("td",[s._v("index: 当前滚动列索引,Number类型")]),s._v(" "),a("td",[s._v("selectedIndex: 当前列选中项的索引,Number类型")])])])])},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("tbody",[a("tr",[a("td",[s._v("show")]),s._v(" "),a("td",[s._v("显示选择器")])]),s._v(" "),a("tr",[a("td",[s._v("hide")]),s._v(" "),a("td",[s._v("隐藏选择器")])])])])}]}},UCq8:function(s,t,a){s.exports=a("spOv")},spOv:function(s,t,a){var v=a("VU/8")(null,a("CiMa"),null,null,null);s.exports=v.exports}});
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
webpackJsonp([20],{Po76:function(e,s,t){var a=t("VU/8")(null,t("f3V4"),null,null,null);e.exports=a.exports},f3V4:function(e,s){e.exports={render:function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("section",[t("h2",{attrs:{id:"后编译"}},[t("a",{staticClass:"anchor",attrs:{href:"#cube-后编译-anchor","aria-hidden":"true"}},[t("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[t("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(" 后编译")]),e._v(" "),t("p",[e._v("后编译指的是应用依赖的 NPM 包并不需要在发布前编译,而是随着应用编译打包的时候一块编译。")]),e._v(" "),e._m(0),e._v(" "),t("h3",{attrs:{id:"背景"}},[t("a",{staticClass:"anchor",attrs:{href:"#cube-背景-anchor","aria-hidden":"true"}},[t("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[t("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(" 背景")]),e._v(" "),t("p",[e._v("使用 webpack + babel 开发应用越来越多,而且一般都是通过 NPM 进行包管理的,这样依赖包越来越多,这些依赖包也是使用的 ES2015+ 开发的,所以每个依赖包都需要编译才能发布,这样编译后代码中往往后包含很多编译代码,所以为了消除这部分冗余,推荐大家使用后编译。")]),e._v(" "),t("h3",{attrs:{id:"优缺点"}},[t("a",{staticClass:"anchor",attrs:{href:"#cube-优缺点-anchor","aria-hidden":"true"}},[t("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[t("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(" 优缺点")]),e._v(" "),t("p",[e._v("优点:")]),e._v(" "),e._m(1),e._v(" "),t("p",[e._v("缺点:")]),e._v(" "),e._m(2),e._v(" "),t("h3",{attrs:{id:"约定"}},[t("a",{staticClass:"anchor",attrs:{href:"#cube-约定-anchor","aria-hidden":"true"}},[t("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[t("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(" 约定")]),e._v(" "),t("p",[e._v("考虑到有些应用会使用后编译,有些则只能使用编译好的依赖包,为了“争夺”入口,cube-ui 做了均衡,约定:")]),e._v(" "),e._m(3),e._v(" "),e._m(4),e._v(" "),t("p",[e._v("这样,如果应用使用的是 webpack 2+,则默认走后编译,而如果使用的 webpack 1.x 则默认使用的是编译后内容;当然,这部分可以通过 webpack 的 alias 配置达到和版本无关效果。")]),e._v(" "),t("h3",{attrs:{id:"webpack配置使用"}},[t("a",{staticClass:"anchor",attrs:{href:"#cube-webpack配置使用-anchor","aria-hidden":"true"}},[t("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[t("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(" webpack 配置使用")]),e._v(" "),e._m(5),e._v(" "),t("p",[e._v("一个应用示例配置:")]),e._v(" "),e._m(6),e._v(" "),t("p",[e._v("在应用的 package.json 中增加 compileDependencies:")]),e._v(" "),e._m(7),e._v(" "),t("p",[e._v("如果说 A 还依赖 C 的话,只需要在 A 的 package.json 中指定 compileDependencies 即可:")]),e._v(" "),e._m(8)])},staticRenderFns:[function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("p",[t("em",[e._v("注:")]),e._v(" 关于后编译更详细内容可参阅 "),t("a",{attrs:{href:"https://github.com/DDFE/DDFE-blog/issues/23"}},[e._v("webpack 应用编译优化之路")])])},function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("ul",[t("li",[e._v("公共的依赖可以实现共用,只此一份,重要的是只编译一次,建议通过 peerDependencies 管理依赖。")]),e._v(" "),t("li",[e._v("babel 转换 API(例如 babel-plugin-transform-runtime 或者 babel-polyfill)部分的代码只有一份。")]),e._v(" "),t("li",[e._v("不用每个依赖包都需要配置编译打包环节,甚至可以直接源码级别发布。")])])},function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("ul",[t("li",[e._v("主应用的 babel 配置需要能兼容依赖包的 babel 配置。")]),e._v(" "),t("li",[e._v("依赖包不能使用 alias、不能方便的使用 DefinePlugin(可以经过一次简单编译,但是不做 babel 处理)。")]),e._v(" "),t("li",[e._v("应用编译时间会变长。")])])},function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("blockquote",[t("p",[e._v("package.json 的 main 字段指向的就是编译后入口,而 module 字段指向的就是源码入口。")])])},function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("p",[t("em",[e._v("关于 "),t("a",{attrs:{href:"https://github.com/rollup/rollup/wiki/pkg.module"}},[e._v("pkg.module")])])])},function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("p",[e._v("后编译的场景是极有可能产生嵌套的情况,而且对于每个依赖包而言应该自己管理自身需要后编译的依赖;为了解决这个问题,可以使用 "),t("a",{attrs:{href:"https://www.npmjs.com/package/webpack-post-compile-plugin"}},[e._v("webpack-post-compile-plugin")]),e._v(",只需要在应用或者 NPM 包自身的 package.json 中通过 compileDependencies 来指定自身需要后编译依赖的包名。")])},function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("pre",{pre:!0},[t("code",{attrs:{"v-pre":"",class:"language-js"}},[t("span",{attrs:{class:"hljs-comment"}},[e._v("// webpack.config.js")]),e._v("\n"),t("span",{attrs:{class:"hljs-keyword"}},[e._v("var")]),e._v(" PostCompilePlugin = "),t("span",{attrs:{class:"hljs-built_in"}},[e._v("require")]),e._v("("),t("span",{attrs:{class:"hljs-string"}},[e._v("'webpack-post-compile-plugin'")]),e._v(")\n\n"),t("span",{attrs:{class:"hljs-built_in"}},[e._v("module")]),e._v(".exports = {\n "),t("span",{attrs:{class:"hljs-comment"}},[e._v("// ...")]),e._v("\n "),t("span",{attrs:{class:"hljs-built_in"}},[e._v("module")]),e._v(": {\n "),t("span",{attrs:{class:"hljs-attr"}},[e._v("rules")]),e._v(": [\n "),t("span",{attrs:{class:"hljs-comment"}},[e._v("// ...")]),e._v("\n {\n "),t("span",{attrs:{class:"hljs-attr"}},[e._v("test")]),e._v(": "),t("span",{attrs:{class:"hljs-regexp"}},[e._v("/\\.js$/")]),e._v(",\n "),t("span",{attrs:{class:"hljs-attr"}},[e._v("loader")]),e._v(": "),t("span",{attrs:{class:"hljs-string"}},[e._v("'babel-loader'")]),e._v(",\n "),t("span",{attrs:{class:"hljs-attr"}},[e._v("include")]),e._v(": [\n resolve("),t("span",{attrs:{class:"hljs-string"}},[e._v("'src'")]),e._v(")\n ]\n },\n "),t("span",{attrs:{class:"hljs-comment"}},[e._v("// ...")]),e._v("\n ]\n },\n "),t("span",{attrs:{class:"hljs-comment"}},[e._v("// ...")]),e._v("\n plugins: [\n "),t("span",{attrs:{class:"hljs-keyword"}},[e._v("new")]),e._v(" PostCompilePlugin()\n ]\n}\n")])])},function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("pre",{pre:!0},[t("code",{attrs:{"v-pre":"",class:"language-json"}},[e._v("// package.json\n{\n // ...\n "),t("span",{attrs:{class:"hljs-attr"}},[e._v('"compileDependencies"')]),e._v(": ["),t("span",{attrs:{class:"hljs-string"}},[e._v('"A"')]),e._v(", "),t("span",{attrs:{class:"hljs-string"}},[e._v('"B"')]),e._v("]\n // ...\n}\n")])])},function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("pre",{pre:!0},[t("code",{attrs:{"v-pre":"",class:"language-json"}},[e._v("// A package.json\n{\n // ...\n "),t("span",{attrs:{class:"hljs-attr"}},[e._v('"compileDependencies"')]),e._v(": ["),t("span",{attrs:{class:"hljs-string"}},[e._v('"C"')]),e._v("]\n // ...\n}\n")])])}]}},hvjf:function(e,s,t){e.exports=t("Po76")}});
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册