提交 7e95c4f4 编写于 作者: D dolymood

docs build

上级 6e474455
<!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.5c34df9a19984a58132dee61f065687b.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=js/manifest.df80754c35edcbb4c784.js></script><script type=text/javascript src=js/vendor.2b90565c5577d894fc0a.js></script><script type=text/javascript src=js/app.09c41d0750b30b8ab6f9.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.1405d96199e0c7032eecfbe4225930aa.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=js/manifest.629dd473cfe13a09fd26.js></script><script type=text/javascript src=js/vendor.6cb48171a5a49a350d88.js></script><script type=text/javascript src=js/app.759d044562ca02d64130.js></script></body></html>
\ No newline at end of file
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
!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,c,a){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 c)Object.prototype.hasOwnProperty.call(c,u)&&(e[u]=c[u]);for(r&&r(t,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=n(n.s=a[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 c=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=c;var a=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:"09c41d0750b30b8ab6f9",1:"2b90565c5577d894fc0a"}[e]+".js";var i=setTimeout(r,12e4);return u.onerror=u.onload=r,a.appendChild(u),c},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
!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:"759d044562ca02d64130",1:"6cb48171a5a49a350d88"}[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
<!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.a1b6487c112e6028233e378dfc1c8889.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/cube-ui/js/manifest.033831aa5457ececd852.js></script><script type=text/javascript src=/cube-ui/js/vendor.f4843f37773cfcea44f3.js></script><script type=text/javascript src=/cube-ui/js/app.2a579527a8daa5dc7209.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><title>cube-ui Document</title><link href=/cube-ui/css/app.a1b6487c112e6028233e378dfc1c8889.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/cube-ui/js/manifest.9e42ca47484755c0a1f3.js></script><script type=text/javascript src=/cube-ui/js/vendor.fd370ed66092840fedb3.js></script><script type=text/javascript src=/cube-ui/js/app.146cad9864e6a1730e02.js></script></body></html>
\ No newline at end of file
webpackJsonp([0],{450:function(t,e,n){function o(t){n(501)}var r=n(11)(n(503),n(504),o,null,null);t.exports=r.exports},501:function(t,e,n){var o=n(502);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n(448)("b8aa7ece",o,!0)},502:function(t,e,n){e=t.exports=n(447)(!1),e.push([t.i,"",""])},503:function(t,e,n){var o,r,u;!function(s,c){r=[t,e,n(141)],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})},504:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("viewport",{attrs:{lang:"zh-CN"}})},staticRenderFns:[]}}});
\ No newline at end of file
webpackJsonp([0],{450:function(t,e,n){function o(t){n(505)}var r=n(11)(n(507),n(508),o,null,null);t.exports=r.exports},505:function(t,e,n){var o=n(506);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n(448)("e0abb45c",o,!0)},506:function(t,e,n){e=t.exports=n(447)(!1),e.push([t.i,"",""])},507:function(t,e,n){var o,r,u;!function(s,c){r=[t,e,n(141)],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})},508:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("viewport",{attrs:{lang:"zh-CN"}})},staticRenderFns:[]}}});
\ No newline at end of file
webpackJsonp([1],{449:function(t,e,n){function o(t){n(497)}var r=n(11)(n(499),n(500),o,null,null);t.exports=r.exports},497:function(t,e,n){var o=n(498);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n(448)("610f826e",o,!0)},498:function(t,e,n){e=t.exports=n(447)(!1),e.push([t.i,"",""])},499:function(t,e,n){var o,r,u;!function(s,i){r=[t,e,n(141)],o=i,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})},500:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("viewport",{attrs:{lang:"en-US"}})},staticRenderFns:[]}}});
\ No newline at end of file
webpackJsonp([1],{449:function(e,t,n){function o(e){n(501)}var r=n(11)(n(503),n(504),o,null,null);e.exports=r.exports},501:function(e,t,n){var o=n(502);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);n(448)("4e79e8f8",o,!0)},502:function(e,t,n){t=e.exports=n(447)(!1),t.push([e.i,"",""])},503:function(e,t,n){var o,r,u;!function(s,i){r=[e,t,n(141)],o=i,void 0!==(u="function"==typeof o?o.apply(t,r):o)&&(e.exports=u)}(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})},504:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("viewport",{attrs:{lang:"en-US"}})},staticRenderFns:[]}}});
\ No newline at end of file
此差异已折叠。
webpackJsonp([11],{491:function(s,t,a){s.exports=a(589)},589:function(s,t,a){var v=a(11)(null,a(590),null,null,null);s.exports=v.exports},590: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:"Radio单选框组"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Radio单选框组-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(" Radio 单选框组")]),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),s._v(" "),s._m(2),s._v(" "),s._m(3),s._v(" "),s._m(4)])},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("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-radio")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"selected"')]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v(":options")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"options"')]),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("export")]),s._v(" "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("default")]),s._v(" {\n data() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("return")]),s._v(" {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("selected")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("''")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("options")]),s._v(": ["),a("span",{attrs:{class:"hljs-string"}},[s._v("'Option1'")]),s._v(", "),a("span",{attrs:{class:"hljs-string"}},[s._v("'Option2'")]),s._v("]\n }\n }\n}\n")])]),s._v(" "),a("p",[a("code",{pre:!0},[s._v("options")]),s._v(" 为选项数组,默认不选中任何的选项,点击其中一个,则对应的 "),a("code",{pre:!0},[s._v("selected")]),s._v(" 的值就为选中项的值。")])]),s._v(" "),a("li",[a("p",[s._v("设置 value,禁用状态,图标位置")]),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-radio")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"selected2"')]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v(":options")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"options2"')]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("position")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"right"')]),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("export")]),s._v(" "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("default")]),s._v(" {\n data() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("return")]),s._v(" {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("selected2")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'3'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("options2")]),s._v(": [\n {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'Option1'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("value")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'1'")]),s._v("\n },\n {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'Option2'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("value")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'2'")]),s._v("\n },\n {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'Option3'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("value")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'3'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("disabled")]),s._v(": "),a("span",{attrs:{class:"hljs-literal"}},[s._v("true")]),s._v("\n }\n ]\n }\n }\n}\n")])]),s._v(" "),a("p",[a("code",{pre:!0},[s._v("options")]),s._v(" 的值可以是对象组成的数组,默认可以设置 "),a("code",{pre:!0},[s._v("label")]),s._v(""),a("code",{pre:!0},[s._v("value")]),s._v(" 分别代表的是显示文案和单选框的值,如果对象中包含了 "),a("code",{pre:!0},[s._v("disabled")]),s._v(""),a("code",{pre:!0},[s._v("true")]),s._v(" 的值,那么此单选框就处于禁用状态。")]),s._v(" "),a("p",[s._v("设置 "),a("code",{pre:!0},[s._v("position")]),s._v(""),a("code",{pre:!0},[s._v("'right'")]),s._v(",则单选框图标位置在右边。")])]),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-radio")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"selected3"')]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v(":options")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"options3"')]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v(":horizontal")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"true"')]),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("export")]),s._v(" "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("default")]),s._v(" {\n data() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("return")]),s._v(" {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("selected3")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'3'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("options3")]),s._v(": [\n {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'1'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("value")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'1'")]),s._v("\n },\n {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'2'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("value")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'2'")]),s._v("\n },\n {\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'3'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("value")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'3'")]),s._v(",\n "),a("span",{attrs:{class:"hljs-attr"}},[s._v("disabled")]),s._v(": "),a("span",{attrs:{class:"hljs-literal"}},[s._v("true")]),s._v("\n }\n ]\n }\n }\n}\n")])]),s._v(" "),a("p",[s._v("可通过设置 "),a("code",{pre:!0},[s._v("horizontal")]),s._v(""),a("code",{pre:!0},[s._v("true")]),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("options")]),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("position")]),s._v(" "),a("td",[s._v("图标位置")]),s._v(" "),a("td",[s._v("String")]),s._v(" "),a("td",[s._v("left/right")]),s._v(" "),a("td",[s._v("left")])]),s._v(" "),a("tr",[a("td",[s._v("horizontal")]),s._v(" "),a("td",[s._v("是否水平排列")]),s._v(" "),a("td",[s._v("Boolean")]),s._v(" "),a("td",[s._v("true/false")]),s._v(" "),a("td",[s._v("false")])])])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ul",[a("li",[a("code",{pre:!0},[s._v("options")]),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("tbody",[a("tr",[a("td",[s._v("label")]),s._v(" "),a("td",[s._v("单选框显示文字")]),s._v(" "),a("td",[s._v("String")])]),s._v(" "),a("tr",[a("td",[s._v("value")]),s._v(" "),a("td",[s._v("单选框的值")]),s._v(" "),a("td",[s._v("String/Number")])]),s._v(" "),a("tr",[a("td",[s._v("disabled")]),s._v(" "),a("td",[s._v("单选框是否被禁用")]),s._v(" "),a("td",[s._v("Boolean")])])])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[s._v("注:如果 "),a("code",{pre:!0},[s._v("options")]),s._v(" 中的项为字符串也是可以的,此时默认 "),a("code",{pre:!0},[s._v("label")]),s._v(""),a("code",{pre:!0},[s._v("value")]),s._v(" 的值都为该字符串的值。")])}]}}});
\ No newline at end of file
webpackJsonp([11],{487:function(e,s,t){e.exports=t(577)},577:function(e,s,t){var a=t(11)(null,t(578),null,null,null);e.exports=a.exports},578: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")])])}]}}});
\ No newline at end of file
webpackJsonp([13],{489:function(e,s,t){e.exports=t(585)},585:function(e,s,t){var a=t(11)(null,t(586),null,null,null);e.exports=a.exports},586: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")])])}]}}});
\ No newline at end of file
webpackJsonp([15],{483:function(t,s,a){t.exports=a(569)},569:function(t,s,a){var e=a(11)(null,a(570),null,null,null);t.exports=e.exports},570:function(t,s){t.exports={render:function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",[a("h2",{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"}})])]),t._v(" 介绍")]),t._v(" "),a("p",[t._v("cube-ui 是基于 Vue.js 实现的精致移动端组件库。")]),t._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"}})])]),t._v(" 特性")]),t._v(" "),t._m(0),t._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"}})])]),t._v(" 组件")]),t._v(" "),a("h4",{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"}})])]),t._v(" 基础")]),t._v(" "),t._m(1),t._v(" "),a("h4",{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"}})])]),t._v(" 弹层")]),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),a("p",[t._v("组件调用:")]),t._v(" "),t._m(4),t._v(" "),a("p",[t._v("API 调用:")]),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),t._m(7),t._v(" "),a("h4",{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"}})])]),t._v(" 滚动")]),t._v(" "),t._m(8),t._v(" "),t._m(9),t._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"}})])]),t._v(" 模块")]),t._v(" "),a("p",[t._v("除了组件之外,cube-ui 还有一些特殊的模块。")]),t._v(" "),a("h4",{attrs:{id:"style"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-style-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"}})])]),t._v(" style")]),t._v(" "),a("p",[t._v("样式部分,如果你是在按需引入使用的场景下,那么建议在入口文件处也要引入这个模块,因为它包含基础的 reset、基础通用样式以及内置 icon。")]),t._v(" "),t._m(10),t._v(" "),a("h4",{attrs:{id:"create-api"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-create-api-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"}})])]),t._v(" create-api")]),t._v(" "),t._m(11),t._v(" "),t._m(12),t._v(" "),a("h4",{attrs:{id:"better-scroll"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-better-scroll-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"}})])]),t._v(" better-scroll")]),t._v(" "),t._m(13),t._v(" "),t._m(14)])},staticRenderFns:[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[a("p",[a("strong",[t._v("质量可靠")])]),t._v(" "),a("p",[t._v("由滴滴内部组件库精简提炼而来,经历了业务一年多的考验,并且每个组件都有充分单元测试,为后续集成提供保障。")])]),t._v(" "),a("li",[a("p",[a("strong",[t._v("体验极致")])]),t._v(" "),a("p",[t._v("以迅速响应、动画流畅、接近原生为目标,在交互体验方面追求极致。")])]),t._v(" "),a("li",[a("p",[a("strong",[t._v("标准规范")])]),t._v(" "),a("p",[t._v("遵循统一的设计交互标准,高度还原设计效果;接口标准化,统一规范使用方式,开发更加简单高效。")])]),t._v(" "),a("li",[a("p",[a("strong",[t._v("扩展性强")])]),t._v(" "),a("p",[t._v("支持按需引入和"),a("a",{attrs:{href:"#/zh-CN/docs/post-compile"}},[t._v("后编译")]),t._v(",轻量灵活;扩展性强,可以方便地基于现有组件实现二次开发。")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[a("a",{attrs:{href:"#/zh-CN/docs/button"}},[t._v("Button 按钮")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/checkbox"}},[t._v("Checkbox 复选框")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/checkbox-group"}},[t._v("CheckboxGroup 复选框组")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/loading"}},[t._v("Loading 加载中")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/tip"}},[t._v("Tip 提示")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[a("a",{attrs:{href:"#/zh-CN/docs/popup"}},[t._v("Popup")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/toast"}},[t._v("Toast 提醒")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/picker"}},[t._v("Picker 选择器")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/time-picker"}},[t._v("TimePicker 时间选择器")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/dialog"}},[t._v("Dialog 弹框")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/action-sheet"}},[t._v("ActionSheet 操作菜单")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("所有的弹层类组件可以通过组件调用和 API 调用,来看示例("),a("code",{pre:!0},[t._v("Toast")]),t._v(" 为例):")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-html"}},[a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("template")]),t._v(">")]),t._v("\n "),a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-button")]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("@click")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"showToast"')]),t._v(">")]),t._v("show toast"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-button")]),t._v(">")]),t._v("\n "),a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-toast")]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("ref")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"toast"')]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v(":txt")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"toastTxt"')]),t._v(">")]),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-toast")]),t._v(">")]),t._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("template")]),t._v(">")]),t._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("script")]),t._v(">")]),a("span",{attrs:{class:"javascript"}},[t._v("\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n data() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("return")]),t._v(" {\n "),a("span",{attrs:{class:"hljs-attr"}},[t._v("toastTxt")]),t._v(": "),a("span",{attrs:{class:"hljs-string"}},[t._v("'toast content'")]),t._v("\n }\n },\n "),a("span",{attrs:{class:"hljs-attr"}},[t._v("methods")]),t._v(": {\n showToast() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("this")]),t._v(".$refs.toast.show()\n }\n }\n }\n")]),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("script")]),t._v(">")]),t._v("\n")])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-html"}},[a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("template")]),t._v(">")]),t._v("\n "),a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-button")]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("@click")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"showToast"')]),t._v(">")]),t._v("show toast"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-button")]),t._v(">")]),t._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("template")]),t._v(">")]),t._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("script")]),t._v(">")]),a("span",{attrs:{class:"javascript"}},[t._v("\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n data() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("return")]),t._v(" {\n "),a("span",{attrs:{class:"hljs-attr"}},[t._v("toastTxt")]),t._v(": "),a("span",{attrs:{class:"hljs-string"}},[t._v("'toast content'")]),t._v("\n }\n },\n "),a("span",{attrs:{class:"hljs-attr"}},[t._v("methods")]),t._v(": {\n showToast() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("this")]),t._v(".$createToast({\n "),a("span",{attrs:{class:"hljs-attr"}},[t._v("txt")]),t._v(": "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("this")]),t._v(".toastTxt\n }).show()\n }\n }\n }\n")]),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("script")]),t._v(">")]),t._v("\n")])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("两种方式都可以,但是我们推荐后者,通过 "),a("code",{pre:!0},[t._v("$createXxYy")]),t._v(" API 来调用;通过 API 调用的话,这个弹框是附加到 "),a("code",{pre:!0},[t._v("body")]),t._v(" 元素下的,这样的好处是可以不受外层样式的影响,因为组件调用的话,很容易受到外层 "),a("code",{pre:!0},[t._v("transform")]),t._v(", "),a("code",{pre:!0},[t._v("overflow")]),t._v(" 等样式的影响。")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("注意这个 API 的名字的组合就是:"),a("code",{pre:!0},[t._v("$create")]),t._v(" + "),a("code",{pre:!0},[t._v("${组件名字}")]),t._v(",例如 "),a("code",{pre:!0},[t._v("ActionSheet")]),t._v(" 组件的话,API 名字就是 "),a("code",{pre:!0},[t._v("$createActionSheet")]),t._v("")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[a("a",{attrs:{href:"#/zh-CN/docs/scroll"}},[t._v("Scroll 滚动")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/slide"}},[t._v("Slide 幻灯片")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/index-list"}},[t._v("IndexList 索引列表")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("滚动类组件都是基于 "),a("a",{attrs:{href:"https://github.com/ustbhuangyi/better-scroll"}},[t._v("better-scroll")]),t._v(" 实现,而 "),a("code",{pre:!0},[t._v("Scroll")]),t._v(" 组件就是对 better-scroll 的封装。")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("详见 "),a("a",{attrs:{href:"#/zh-CN/docs/style"}},[t._v("style 模块")]),t._v("")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("有些时候,开发者可能也需要自己封装的组件支持 API 式调用,此时可以通过引入 create-api 模块或者通过全局的 "),a("code",{pre:!0},[t._v("Cube.createAPI")]),t._v(" 接口来达到封装目的。")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("详见 "),a("a",{attrs:{href:"#/zh-CN/docs/create-api"}},[t._v("create-api 模块")]),t._v("")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[a("a",{attrs:{href:"https://github.com/ustbhuangyi/better-scroll"}},[t._v("better-scroll")]),t._v(" 是组件库依赖的一个库,为了避免重复引入问题,我们暴露出了这个模块。")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("详见 "),a("a",{attrs:{href:"#/zh-CN/docs/better-scroll"}},[t._v("better-scroll 模块")]),t._v("")])}]}}});
\ No newline at end of file
webpackJsonp([14],{484:function(s,t,a){s.exports=a(571)},571:function(s,t,a){var e=a(11)(null,a(572),null,null,null);s.exports=e.exports},572: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")])])])])}]}}});
\ No newline at end of file
webpackJsonp([16],{486:function(s,t,a){s.exports=a(579)},579:function(s,t,a){var e=a(11)(null,a(580),null,null,null);s.exports=e.exports},580: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")])])])])}]}}});
\ No newline at end of file
webpackJsonp([17],{485:function(t,s,a){t.exports=a(577)},577:function(t,s,a){var e=a(11)(null,a(578),null,null,null);t.exports=e.exports},578:function(t,s){t.exports={render:function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",[a("h2",{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"}})])]),t._v(" 介绍")]),t._v(" "),a("p",[t._v("cube-ui 是基于 Vue.js 实现的精致移动端组件库。")]),t._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"}})])]),t._v(" 特性")]),t._v(" "),t._m(0),t._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"}})])]),t._v(" 组件")]),t._v(" "),a("h4",{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"}})])]),t._v(" 基础")]),t._v(" "),t._m(1),t._v(" "),a("h4",{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"}})])]),t._v(" 弹层")]),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),a("p",[t._v("组件调用:")]),t._v(" "),t._m(4),t._v(" "),a("p",[t._v("API 调用:")]),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),t._m(7),t._v(" "),a("h4",{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"}})])]),t._v(" 滚动")]),t._v(" "),t._m(8),t._v(" "),t._m(9),t._v(" "),a("h4",{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"}})])]),t._v(" 高级")]),t._v(" "),t._m(10),t._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"}})])]),t._v(" 模块")]),t._v(" "),a("p",[t._v("除了组件之外,cube-ui 还有一些特殊的模块。")]),t._v(" "),a("h4",{attrs:{id:"style"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-style-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"}})])]),t._v(" style")]),t._v(" "),a("p",[t._v("样式部分,如果你是在按需引入使用的场景下,那么建议在入口文件处也要引入这个模块,因为它包含基础的 reset、基础通用样式以及内置 icon。")]),t._v(" "),t._m(11),t._v(" "),a("h4",{attrs:{id:"create-api"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-create-api-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"}})])]),t._v(" create-api")]),t._v(" "),t._m(12),t._v(" "),t._m(13),t._v(" "),a("h4",{attrs:{id:"better-scroll"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-better-scroll-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"}})])]),t._v(" better-scroll")]),t._v(" "),t._m(14),t._v(" "),t._m(15)])},staticRenderFns:[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[a("p",[a("strong",[t._v("质量可靠")])]),t._v(" "),a("p",[t._v("由滴滴内部组件库精简提炼而来,经历了业务一年多的考验,并且每个组件都有充分单元测试,为后续集成提供保障。")])]),t._v(" "),a("li",[a("p",[a("strong",[t._v("体验极致")])]),t._v(" "),a("p",[t._v("以迅速响应、动画流畅、接近原生为目标,在交互体验方面追求极致。")])]),t._v(" "),a("li",[a("p",[a("strong",[t._v("标准规范")])]),t._v(" "),a("p",[t._v("遵循统一的设计交互标准,高度还原设计效果;接口标准化,统一规范使用方式,开发更加简单高效。")])]),t._v(" "),a("li",[a("p",[a("strong",[t._v("扩展性强")])]),t._v(" "),a("p",[t._v("支持按需引入和"),a("a",{attrs:{href:"#/zh-CN/docs/post-compile"}},[t._v("后编译")]),t._v(",轻量灵活;扩展性强,可以方便地基于现有组件实现二次开发。")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[a("a",{attrs:{href:"#/zh-CN/docs/button"}},[t._v("Button 按钮")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/checkbox"}},[t._v("Checkbox 复选框")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/checkbox-group"}},[t._v("CheckboxGroup 复选框组")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/radio"}},[t._v("Radio 单选框")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/loading"}},[t._v("Loading 加载中")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/tip"}},[t._v("Tip 提示")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[a("a",{attrs:{href:"#/zh-CN/docs/popup"}},[t._v("Popup")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/toast"}},[t._v("Toast 提醒")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/picker"}},[t._v("Picker 选择器")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/time-picker"}},[t._v("TimePicker 时间选择器")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/dialog"}},[t._v("Dialog 弹框")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/action-sheet"}},[t._v("ActionSheet 操作菜单")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("所有的弹层类组件可以通过组件调用和 API 调用,来看示例("),a("code",{pre:!0},[t._v("Toast")]),t._v(" 为例):")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-html"}},[a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("template")]),t._v(">")]),t._v("\n "),a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-button")]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("@click")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"showToast"')]),t._v(">")]),t._v("show toast"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-button")]),t._v(">")]),t._v("\n "),a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-toast")]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("ref")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"toast"')]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v(":txt")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"toastTxt"')]),t._v(">")]),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-toast")]),t._v(">")]),t._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("template")]),t._v(">")]),t._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("script")]),t._v(">")]),a("span",{attrs:{class:"javascript"}},[t._v("\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n data() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("return")]),t._v(" {\n "),a("span",{attrs:{class:"hljs-attr"}},[t._v("toastTxt")]),t._v(": "),a("span",{attrs:{class:"hljs-string"}},[t._v("'toast content'")]),t._v("\n }\n },\n "),a("span",{attrs:{class:"hljs-attr"}},[t._v("methods")]),t._v(": {\n showToast() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("this")]),t._v(".$refs.toast.show()\n }\n }\n }\n")]),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("script")]),t._v(">")]),t._v("\n")])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-html"}},[a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("template")]),t._v(">")]),t._v("\n "),a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-button")]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("@click")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"showToast"')]),t._v(">")]),t._v("show toast"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-button")]),t._v(">")]),t._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("template")]),t._v(">")]),t._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("script")]),t._v(">")]),a("span",{attrs:{class:"javascript"}},[t._v("\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n data() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("return")]),t._v(" {\n "),a("span",{attrs:{class:"hljs-attr"}},[t._v("toastTxt")]),t._v(": "),a("span",{attrs:{class:"hljs-string"}},[t._v("'toast content'")]),t._v("\n }\n },\n "),a("span",{attrs:{class:"hljs-attr"}},[t._v("methods")]),t._v(": {\n showToast() {\n "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("this")]),t._v(".$createToast({\n "),a("span",{attrs:{class:"hljs-attr"}},[t._v("txt")]),t._v(": "),a("span",{attrs:{class:"hljs-keyword"}},[t._v("this")]),t._v(".toastTxt\n }).show()\n }\n }\n }\n")]),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("script")]),t._v(">")]),t._v("\n")])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("两种方式都可以,但是我们推荐后者,通过 "),a("code",{pre:!0},[t._v("$createXxYy")]),t._v(" API 来调用;通过 API 调用的话,这个弹框是附加到 "),a("code",{pre:!0},[t._v("body")]),t._v(" 元素下的,这样的好处是可以不受外层样式的影响,因为组件调用的话,很容易受到外层 "),a("code",{pre:!0},[t._v("transform")]),t._v(", "),a("code",{pre:!0},[t._v("overflow")]),t._v(" 等样式的影响。")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("注意这个 API 的名字的组合就是:"),a("code",{pre:!0},[t._v("$create")]),t._v(" + "),a("code",{pre:!0},[t._v("${组件名字}")]),t._v(",例如 "),a("code",{pre:!0},[t._v("ActionSheet")]),t._v(" 组件的话,API 名字就是 "),a("code",{pre:!0},[t._v("$createActionSheet")]),t._v("")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[a("a",{attrs:{href:"#/zh-CN/docs/scroll"}},[t._v("Scroll 滚动")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/slide"}},[t._v("Slide 幻灯片")])]),t._v(" "),a("li",[a("a",{attrs:{href:"#/zh-CN/docs/index-list"}},[t._v("IndexList 索引列表")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("滚动类组件都是基于 "),a("a",{attrs:{href:"https://github.com/ustbhuangyi/better-scroll"}},[t._v("better-scroll")]),t._v(" 实现,而 "),a("code",{pre:!0},[t._v("Scroll")]),t._v(" 组件就是对 better-scroll 的封装。")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[a("a",{attrs:{href:"#/zh-CN/docs/upload"}},[t._v("Upload 上传")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("详见 "),a("a",{attrs:{href:"#/zh-CN/docs/style"}},[t._v("style 模块")]),t._v("")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("有些时候,开发者可能也需要自己封装的组件支持 API 式调用,此时可以通过引入 create-api 模块或者通过全局的 "),a("code",{pre:!0},[t._v("Cube.createAPI")]),t._v(" 接口来达到封装目的。")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("详见 "),a("a",{attrs:{href:"#/zh-CN/docs/create-api"}},[t._v("create-api 模块")]),t._v("")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[a("a",{attrs:{href:"https://github.com/ustbhuangyi/better-scroll"}},[t._v("better-scroll")]),t._v(" 是组件库依赖的一个库,为了避免重复引入问题,我们暴露出了这个模块。")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",[t._v("详见 "),a("a",{attrs:{href:"#/zh-CN/docs/better-scroll"}},[t._v("better-scroll 模块")]),t._v("")])}]}}});
\ No newline at end of file
webpackJsonp([19],{479:function(t,s,a){t.exports=a(561)},561:function(t,s,a){var e=a(11)(null,a(562),null,null,null);t.exports=e.exports},562:function(t,s){t.exports={render:function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",[a("h2",{attrs:{id:"Checkbox复选框"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Checkbox复选框-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"}})])]),t._v(" Checkbox 复选框")]),t._v(" "),a("p",[t._v("复选框,可设置其状态、传入特殊 class 以及复选框图标位置。")]),t._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"}})])]),t._v(" 示例")]),t._v(" "),t._m(0),t._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"}})])]),t._v(" Props 配置")]),t._v(" "),t._m(1),t._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"}})])]),t._v(" 事件")]),t._v(" "),t._m(2)])},staticRenderFns:[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[t._v("基本用法"),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-html"}},[a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"checked"')]),t._v(">")]),t._v("\n Checkbox\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(">")]),t._v("\n")])]),t._v("\n如果选中了,则 "),a("code",{pre:!0},[t._v("checked")]),t._v(" 的值就为 "),a("code",{pre:!0},[t._v("true")]),t._v("")]),t._v(" "),a("li",[t._v("禁用状态"),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-html"}},[a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"checked"')]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v(":disabled")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"true"')]),t._v(">")]),t._v("\n Disabled Checkbox\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(">")]),t._v("\n")])]),t._v("\n设置 "),a("code",{pre:!0},[t._v("disabled")]),t._v(""),a("code",{pre:!0},[t._v("true")]),t._v(" 即为禁用状态")]),t._v(" "),a("li",[t._v("复选框图标位置"),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-html"}},[a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"checked"')]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("position")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"right"')]),t._v(">")]),t._v("\n Position Checkbox\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(">")]),t._v("\n")])]),t._v("\n设置 "),a("code",{pre:!0},[t._v("position")]),t._v(""),a("code",{pre:!0},[t._v("'right'")]),t._v(" 则复选框图标位置在右边")]),t._v(" "),a("li",[t._v("改变 model 的值"),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-html"}},[a("span",{attrs:{class:"hljs-tag"}},[t._v("<"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("v-model")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"checked"')]),t._v(" "),a("span",{attrs:{class:"hljs-attr"}},[t._v("label")]),t._v("="),a("span",{attrs:{class:"hljs-string"}},[t._v('"labelValue"')]),t._v(">")]),t._v("\n Set label Checkbox\n"),a("span",{attrs:{class:"hljs-tag"}},[t._v("</"),a("span",{attrs:{class:"hljs-name"}},[t._v("cube-checkbox")]),t._v(">")]),t._v("\n")])]),t._v("\n设置 "),a("code",{pre:!0},[t._v("label")]),t._v(",当复选框选中的时候,"),a("code",{pre:!0},[t._v("checked")]),t._v(" 的值就是 "),a("code",{pre:!0},[t._v("'labelValue'")]),t._v(",当未选中的时候,"),a("code",{pre:!0},[t._v("checked")]),t._v(" 的值就是 "),a("code",{pre:!0},[t._v("false")]),t._v(";所以其实在单个复选框的场景下,最好不要设置 "),a("code",{pre:!0},[t._v("label")]),t._v("")])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("table",[a("thead",[a("tr",[a("th",[t._v("参数")]),t._v(" "),a("th",[t._v("说明")]),t._v(" "),a("th",[t._v("类型")]),t._v(" "),a("th",[t._v("可选值")]),t._v(" "),a("th",[t._v("默认值")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("disabled")]),t._v(" "),a("td",[t._v("是否被禁用")]),t._v(" "),a("td",[t._v("Boolean")]),t._v(" "),a("td",[t._v("true/false")]),t._v(" "),a("td",[t._v("false")])]),t._v(" "),a("tr",[a("td",[t._v("position")]),t._v(" "),a("td",[t._v("位置")]),t._v(" "),a("td",[t._v("String")]),t._v(" "),a("td",[t._v("left/right")]),t._v(" "),a("td",[t._v("left")])]),t._v(" "),a("tr",[a("td",[t._v("label")]),t._v(" "),a("td",[t._v("如果选中的话,则是把该值映射到 v-model 上")]),t._v(" "),a("td",[t._v("Boolean/String")]),t._v(" "),a("td",[t._v("-")]),t._v(" "),a("td",[t._v("''")])])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("table",[a("thead",[a("tr",[a("th",[t._v("事件名")]),t._v(" "),a("th",[t._v("说明")]),t._v(" "),a("th",[t._v("参数")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("input")]),t._v(" "),a("td",[t._v("选中状态发生改变时触发")]),t._v(" "),a("td",[t._v("设置的 label 的值或者是否选中的布尔值")])])])])}]}}});
\ No newline at end of file
webpackJsonp([2],{500:function(t,v,_){t.exports=_(607)},607:function(t,v,_){var s=_(11)(null,_(608),null,null,null);t.exports=s.exports},608:function(t,v){t.exports={render:function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("section",[_("h2",{attrs:{id:"Upload组件"}},[_("a",{staticClass:"anchor",attrs:{href:"#cube-Upload组件-anchor","aria-hidden":"true"}},[_("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[_("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(" Upload 组件")]),t._v(" "),t._m(0),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),_("h3",{attrs:{id:"示例"}},[_("a",{staticClass:"anchor",attrs:{href:"#cube-示例-anchor","aria-hidden":"true"}},[_("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[_("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(3),t._v(" "),_("h3",{attrs:{id:"Props配置"}},[_("a",{staticClass:"anchor",attrs:{href:"#cube-Props配置-anchor","aria-hidden":"true"}},[_("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[_("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(4),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),t._m(7),t._v(" "),t._m(8),t._v(" "),t._m(9),t._v(" "),_("h3",{attrs:{id:"事件"}},[_("a",{staticClass:"anchor",attrs:{href:"#cube-事件-anchor","aria-hidden":"true"}},[_("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[_("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(10),t._v(" "),_("h3",{attrs:{id:"实例方法"}},[_("a",{staticClass:"anchor",attrs:{href:"#cube-实例方法-anchor","aria-hidden":"true"}},[_("svg",{attrs:{"aria-hidden":"true",height:"16",version:"1.1",viewBox:"0 0 16 16",width:"16"}},[_("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(11)])},staticRenderFns:[function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("p",[_("code",{pre:!0},[t._v("Upload")]),t._v(" 上传组件。")])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("p",[_("strong",[t._v("注:")]),t._v(" 本文中所有的原始文件对象统称为"),_("strong",[t._v("原始文件")]),t._v(",而经过包装后的文件对象称为"),_("strong",[t._v("文件对象")]),t._v(",这个文件对象的结构如下:")])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("table",[_("thead",[_("tr",[_("th",[t._v("属性")]),t._v(" "),_("th",[t._v("说明")]),t._v(" "),_("th",[t._v("类型")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("name")]),t._v(" "),_("td",[t._v("文件名")]),t._v(" "),_("td",[t._v("String")])]),t._v(" "),_("tr",[_("td",[t._v("size")]),t._v(" "),_("td",[t._v("文件大小")]),t._v(" "),_("td",[t._v("Number")])]),t._v(" "),_("tr",[_("td",[t._v("url")]),t._v(" "),_("td",[t._v("文件 url,通过 URL.createObjectURL 获得")]),t._v(" "),_("td",[t._v("String")])]),t._v(" "),_("tr",[_("td",[t._v("base64")]),t._v(" "),_("td",[t._v("文件 base64 的值,这个会从原始文件的 base64 属性获得(默认是没有的,但是插件可以添加,例如下边演示的压缩 compress 插件就会添加 base64 值)")]),t._v(" "),_("td",[t._v("String")])]),t._v(" "),_("tr",[_("td",[t._v("status")]),t._v(" "),_("td",[t._v("文件状态,包含四个: ready, uploading, success, error")]),t._v(" "),_("td",[t._v("String")])]),t._v(" "),_("tr",[_("td",[t._v("progress")]),t._v(" "),_("td",[t._v("文件上传进度,小数 0~1")]),t._v(" "),_("td",[t._v("Number")])]),t._v(" "),_("tr",[_("td",[t._v("file")]),t._v(" "),_("td",[t._v("原始文件")]),t._v(" "),_("td",[t._v("File")])]),t._v(" "),_("tr",[_("td",[t._v("response")]),t._v(" "),_("td",[t._v("响应内容(自动转 JSON)")]),t._v(" "),_("td",[t._v("Object/Array/String")])]),t._v(" "),_("tr",[_("td",[t._v("responseHeaders")]),t._v(" "),_("td",[t._v("响应头")]),t._v(" "),_("td",[t._v("String")])])])])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("ul",[_("li",[_("p",[t._v("基本用法")]),t._v(" "),_("pre",{pre:!0},[_("code",{attrs:{"v-pre":"",class:"language-html"}},[_("span",{attrs:{class:"hljs-tag"}},[t._v("<"),_("span",{attrs:{class:"hljs-name"}},[t._v("cube-upload")]),t._v("\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("action")]),t._v("="),_("span",{attrs:{class:"hljs-string"}},[t._v('"//jsonplaceholder.typicode.com/photos/"')]),t._v("\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v(":simultaneous-uploads")]),t._v("="),_("span",{attrs:{class:"hljs-string"}},[t._v('"1"')]),t._v("\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("@files-added")]),t._v("="),_("span",{attrs:{class:"hljs-string"}},[t._v('"filesAdded"')]),t._v(" />")]),t._v("\n")])]),t._v(" "),_("pre",{pre:!0},[_("code",{attrs:{"v-pre":"",class:"language-js"}},[_("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),_("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("methods")]),t._v(": {\n filesAdded(files) {\n "),_("span",{attrs:{class:"hljs-keyword"}},[t._v("const")]),t._v(" maxSize = "),_("span",{attrs:{class:"hljs-number"}},[t._v("1")]),t._v(" * "),_("span",{attrs:{class:"hljs-number"}},[t._v("1024")]),t._v(" * "),_("span",{attrs:{class:"hljs-number"}},[t._v("1024")]),t._v(" "),_("span",{attrs:{class:"hljs-comment"}},[t._v("// 1M")]),t._v("\n "),_("span",{attrs:{class:"hljs-keyword"}},[t._v("for")]),t._v(" ("),_("span",{attrs:{class:"hljs-keyword"}},[t._v("let")]),t._v(" k "),_("span",{attrs:{class:"hljs-keyword"}},[t._v("in")]),t._v(" files) {\n "),_("span",{attrs:{class:"hljs-keyword"}},[t._v("const")]),t._v(" file = files[k]\n "),_("span",{attrs:{class:"hljs-keyword"}},[t._v("if")]),t._v(" (file.size > maxSize) {\n file.ignore = "),_("span",{attrs:{class:"hljs-literal"}},[t._v("true")]),t._v("\n }\n }\n }\n }\n}\n")])]),t._v(" "),_("p",[t._v("配置 "),_("code",{pre:!0},[t._v("action")]),t._v(" 表示上传的 URL 地址,而 "),_("code",{pre:!0},[t._v("simultaneous-uploads")]),t._v(" 则表示支持的并发上传个数。")]),t._v(" "),_("p",[t._v("通过 "),_("code",{pre:!0},[t._v("files-added")]),t._v(" 事件可以实现文件过滤,设置 "),_("code",{pre:!0},[t._v("file.ignore = true")]),t._v(" 即可。")])]),t._v(" "),_("li",[_("p",[t._v("压缩图片且通过 Base64 上传")]),t._v(" "),_("pre",{pre:!0},[_("code",{attrs:{"v-pre":"",class:"language-html"}},[_("span",{attrs:{class:"hljs-tag"}},[t._v("<"),_("span",{attrs:{class:"hljs-name"}},[t._v("cube-upload")]),t._v("\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("ref")]),t._v("="),_("span",{attrs:{class:"hljs-string"}},[t._v('"upload2"')]),t._v("\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v(":action")]),t._v("="),_("span",{attrs:{class:"hljs-string"}},[t._v('"action2"')]),t._v("\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v(":simultaneous-uploads")]),t._v("="),_("span",{attrs:{class:"hljs-string"}},[t._v('"1"')]),t._v("\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v(":process-file")]),t._v("="),_("span",{attrs:{class:"hljs-string"}},[t._v('"processFile"')]),t._v("\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("@file-submitted")]),t._v("="),_("span",{attrs:{class:"hljs-string"}},[t._v('"fileSubmitted"')]),t._v(" />")]),t._v("\n")])]),t._v(" "),_("pre",{pre:!0},[_("code",{attrs:{"v-pre":"",class:"language-js"}},[_("span",{attrs:{class:"hljs-keyword"}},[t._v("import")]),t._v(" compress "),_("span",{attrs:{class:"hljs-keyword"}},[t._v("from")]),t._v(" "),_("span",{attrs:{class:"hljs-string"}},[t._v("'../modules/image'")]),t._v("\n"),_("span",{attrs:{class:"hljs-keyword"}},[t._v("export")]),t._v(" "),_("span",{attrs:{class:"hljs-keyword"}},[t._v("default")]),t._v(" {\n data() {\n "),_("span",{attrs:{class:"hljs-keyword"}},[t._v("return")]),t._v(" {\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("action2")]),t._v(": {\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("target")]),t._v(": "),_("span",{attrs:{class:"hljs-string"}},[t._v("'//jsonplaceholder.typicode.com/photos/'")]),t._v(",\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("prop")]),t._v(": "),_("span",{attrs:{class:"hljs-string"}},[t._v("'base64Value'")]),t._v("\n }\n }\n },\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("methods")]),t._v(": {\n processFile(file, next) {\n compress(file, {\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("compress")]),t._v(": {\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("width")]),t._v(": "),_("span",{attrs:{class:"hljs-number"}},[t._v("1600")]),t._v(",\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("height")]),t._v(": "),_("span",{attrs:{class:"hljs-number"}},[t._v("1600")]),t._v(",\n "),_("span",{attrs:{class:"hljs-attr"}},[t._v("quality")]),t._v(": "),_("span",{attrs:{class:"hljs-number"}},[t._v("0.5")]),t._v("\n }\n }, next)\n },\n fileSubmitted(file) {\n file.base64Value = file.file.base64\n }\n }\n}\n")])]),t._v(" "),_("p",[_("code",{pre:!0},[t._v("action")]),t._v(" 中除了有 "),_("code",{pre:!0},[t._v("target")]),t._v(" 目标上传地址外;还有 "),_("code",{pre:!0},[t._v("prop")]),t._v(" 配置,表示上传的时候采用处理后的 "),_("code",{pre:!0},[t._v("file")]),t._v(" 普通对象的哪个属性所对应的值上传,这里设置的就是 "),_("code",{pre:!0},[t._v("base64Value")]),t._v(" 的值。")]),t._v(" "),_("p",[_("code",{pre:!0},[t._v("process-file")]),t._v(" 则是一个函数,主要用于处理原生文件的,调用 "),_("code",{pre:!0},[t._v("next")]),t._v(" 回调的话,参数是处理完的文件对象,这里示例的就是调用 "),_("code",{pre:!0},[t._v("compress")]),t._v(" 做压缩,处理完后会回调 "),_("code",{pre:!0},[t._v("next")]),t._v("")]),t._v(" "),_("p",[_("code",{pre:!0},[t._v("file-submitted")]),t._v(" 事件则是每个文件处理完后添加到 "),_("code",{pre:!0},[t._v("upload")]),t._v(" 实例的 "),_("code",{pre:!0},[t._v("files")]),t._v(" 数组中后触发,参数就是一个处理后的文件对象。")])])])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("table",[_("thead",[_("tr",[_("th",[t._v("参数")]),t._v(" "),_("th",[t._v("说明")]),t._v(" "),_("th",[t._v("类型")]),t._v(" "),_("th",[t._v("默认值")]),t._v(" "),_("th",[t._v("示例")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("action")]),t._v(" "),_("td",[t._v("上传行为配置项,最少包含上传目标的 URL 地址")]),t._v(" "),_("td",[t._v("String/Object")]),t._v(" "),_("td",[t._v("''")]),t._v(" "),_("td",[t._v("{ target: '/upload' }")])]),t._v(" "),_("tr",[_("td",[t._v("max")]),t._v(" "),_("td",[t._v("最大上传文件个数")]),t._v(" "),_("td",[t._v("Number")]),t._v(" "),_("td",[t._v("10")]),t._v(" "),_("td",[t._v("-")])]),t._v(" "),_("tr",[_("td",[t._v("auto")]),t._v(" "),_("td",[t._v("是否自动上传,即选择完文件后自动开始上传")]),t._v(" "),_("td",[t._v("Boolean")]),t._v(" "),_("td",[t._v("true")]),t._v(" "),_("td",[t._v("-")])]),t._v(" "),_("tr",[_("td",[t._v("simultaneousUploads")]),t._v(" "),_("td",[t._v("并发上传数")]),t._v(" "),_("td",[t._v("Number")]),t._v(" "),_("td",[t._v("1")]),t._v(" "),_("td",[t._v("-")])]),t._v(" "),_("tr",[_("td",[t._v("processFile")]),t._v(" "),_("td",[t._v("处理原始文件函数")]),t._v(" "),_("td",[t._v("Function")]),t._v(" "),_("td",[t._v("function (file, next) { next(file) }")]),t._v(" "),_("td",[t._v("-")])])])])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("ul",[_("li",[_("code",{pre:!0},[t._v("action")]),t._v(" 子配置项")])])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("p",[t._v("如果 "),_("code",{pre:!0},[t._v("action")]),t._v(" 是字符串,则会被处理成 "),_("code",{pre:!0},[t._v("{ target: action }")]),t._v(" 这样结构。")])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("table",[_("thead",[_("tr",[_("th",[t._v("参数")]),t._v(" "),_("th",[t._v("说明")]),t._v(" "),_("th",[t._v("类型")]),t._v(" "),_("th",[t._v("默认值")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("target")]),t._v(" "),_("td",[t._v("上传目标 URL")]),t._v(" "),_("td",[t._v("String")]),t._v(" "),_("td",[t._v("-")])]),t._v(" "),_("tr",[_("td",[t._v("fileName")]),t._v(" "),_("td",[t._v("上传文件时文件的参数名")]),t._v(" "),_("td",[t._v("String")]),t._v(" "),_("td",[t._v("'file'")])]),t._v(" "),_("tr",[_("td",[t._v("prop")]),t._v(" "),_("td",[t._v("上传的时候使用文件对象的 prop 属性所对应的值")]),t._v(" "),_("td",[t._v("String")]),t._v(" "),_("td",[t._v("'file'")])]),t._v(" "),_("tr",[_("td",[t._v("headers")]),t._v(" "),_("td",[t._v("自定义请求头")]),t._v(" "),_("td",[t._v("Object")]),t._v(" "),_("td",[t._v("{}")])]),t._v(" "),_("tr",[_("td",[t._v("data")]),t._v(" "),_("td",[t._v("上传需要附加数据")]),t._v(" "),_("td",[t._v("Object")]),t._v(" "),_("td",[t._v("{}")])]),t._v(" "),_("tr",[_("td",[t._v("withCredentials")]),t._v(" "),_("td",[t._v("标准的 CORS 请求是不会带上 cookie 的,如果想要带的话需要设置 withCredentials 为 true")]),t._v(" "),_("td",[t._v("Boolean")]),t._v(" "),_("td",[t._v("false")])]),t._v(" "),_("tr",[_("td",[t._v("timeout")]),t._v(" "),_("td",[t._v("请求超时时间")]),t._v(" "),_("td",[t._v("Number")]),t._v(" "),_("td",[t._v("0")])]),t._v(" "),_("tr",[_("td",[t._v("progressInterval")]),t._v(" "),_("td",[t._v("进度回调间隔(单位:ms)")]),t._v(" "),_("td",[t._v("Number")]),t._v(" "),_("td",[t._v("100")])])])])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("ul",[_("li",[_("code",{pre:!0},[t._v("processFile")]),t._v(" 子配置项")])])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("p",[t._v("一个函数,这个函数有两个参数:"),_("code",{pre:!0},[t._v("(file, next)")]),t._v(""),_("code",{pre:!0},[t._v("file")]),t._v(" 就是原始文件,"),_("code",{pre:!0},[t._v("next")]),t._v(" 为处理完毕后的回调函数,调用的时候需要传入处理后的文件。")])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("table",[_("thead",[_("tr",[_("th",[t._v("事件名")]),t._v(" "),_("th",[t._v("说明")]),t._v(" "),_("th",[t._v("参数")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("files-added")]),t._v(" "),_("td",[t._v("选择完文件后触发,一般可用作文件过滤")]),t._v(" "),_("td",[t._v("原始文件列表")])]),t._v(" "),_("tr",[_("td",[t._v("file-submitted")]),t._v(" "),_("td",[t._v("每个文件处理完后添加到 "),_("code",{pre:!0},[t._v("upload")]),t._v(" 实例的 "),_("code",{pre:!0},[t._v("files")]),t._v(" 数组中后触发")]),t._v(" "),_("td",[t._v("文件对象")])]),t._v(" "),_("tr",[_("td",[t._v("file-removed")]),t._v(" "),_("td",[t._v("文件被删除后触发")]),t._v(" "),_("td",[t._v("文件对象")])]),t._v(" "),_("tr",[_("td",[t._v("file-success")]),t._v(" "),_("td",[t._v("文件上传成功后触发")]),t._v(" "),_("td",[t._v("文件对象")])]),t._v(" "),_("tr",[_("td",[t._v("file-error")]),t._v(" "),_("td",[t._v("文件上传失败后触发")]),t._v(" "),_("td",[t._v("文件对象")])]),t._v(" "),_("tr",[_("td",[t._v("file-click")]),t._v(" "),_("td",[t._v("文件点击后触发")]),t._v(" "),_("td",[t._v("文件对象")])])])])},function(){var t=this,v=t.$createElement,_=t._self._c||v;return _("table",[_("thead",[_("tr",[_("th",[t._v("方法名")]),t._v(" "),_("th",[t._v("说明")]),t._v(" "),_("th",[t._v("参数")])])]),t._v(" "),_("tbody",[_("tr",[_("td",[t._v("start")]),t._v(" "),_("td",[t._v("开始上传")]),t._v(" "),_("td",[t._v("-")])]),t._v(" "),_("tr",[_("td",[t._v("pause")]),t._v(" "),_("td",[t._v("暂停上传")]),t._v(" "),_("td",[t._v("-")])]),t._v(" "),_("tr",[_("td",[t._v("retry")]),t._v(" "),_("td",[t._v("重试上传")]),t._v(" "),_("td",[t._v("-")])]),t._v(" "),_("tr",[_("td",[t._v("removeFile")]),t._v(" "),_("td",[t._v("删除文件")]),t._v(" "),_("td",[t._v("文件对象")])])])])}]}}});
\ No newline at end of file
webpackJsonp([20],{478:function(s,a,t){s.exports=t(559)},559:function(s,a,t){var v=t(11)(null,t(560),null,null,null);s.exports=v.exports},560:function(s,a){s.exports={render:function(){var s=this,a=s.$createElement,t=s._self._c||a;return t("section",[t("h2",{attrs:{id:"CheckboxGroup复选框组"}},[t("a",{staticClass:"anchor",attrs:{href:"#cube-CheckboxGroup复选框组-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"}})])]),s._v(" CheckboxGroup 复选框组")]),s._v(" "),t("p",[s._v("复选框组就是一组复选框,主要用来选择一组可选项;有垂直和水平两种样式。")]),s._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"}})])]),s._v(" 示例")]),s._v(" "),s._m(0),s._v(" "),t("h3",{attrs:{id:"Props配置"}},[t("a",{staticClass:"anchor",attrs:{href:"#cube-Props配置-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"}})])]),s._v(" Props 配置")]),s._v(" "),s._m(1),s._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"}})])]),s._v(" 事件")]),s._v(" "),s._m(2)])},staticRenderFns:[function(){var s=this,a=s.$createElement,t=s._self._c||a;return t("ul",[t("li",[t("p",[s._v("垂直排列")]),s._v(" "),t("p",[s._v("默认就是垂直排列样式")]),s._v(" "),t("pre",{pre:!0},[t("code",{attrs:{"v-pre":"",class:"language-html"}},[t("span",{attrs:{class:"hljs-tag"}},[s._v("<"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox-group")]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"checkList"')]),s._v(">")]),s._v("\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("<"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"1"')]),s._v(">")]),s._v("\n Checkbox 1\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("</"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("<"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"2"')]),s._v(">")]),s._v("\n Checkbox 2\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("</"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("<"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"3"')]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v(":disabled")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"true"')]),s._v(">")]),s._v("\n Disabled Checkbox\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("</"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("<"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"4"')]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v(":disabled")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"true"')]),s._v(">")]),s._v("\n Disabled & Checked Checkbox\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("</"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n"),t("span",{attrs:{class:"hljs-tag"}},[s._v("</"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox-group")]),s._v(">")]),s._v("\n")])]),s._v(" "),t("p",[t("code",{pre:!0},[s._v("checkList")]),s._v(" 的值是一个数组,代表的是选中的复选框 "),t("code",{pre:!0},[s._v("label")]),s._v(" 的值的集合。")])]),s._v(" "),t("li",[t("p",[s._v("水平排列")]),s._v(" "),t("p",[s._v("可通过设置 "),t("code",{pre:!0},[s._v("horizontal")]),s._v(" 改变样式为水平排列")]),s._v(" "),t("pre",{pre:!0},[t("code",{attrs:{"v-pre":"",class:"language-html"}},[t("span",{attrs:{class:"hljs-tag"}},[s._v("<"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox-group")]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"checkList"')]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v(":horizontal")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"true"')]),s._v(">")]),s._v("\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("<"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"1"')]),s._v(">")]),s._v("1"),t("span",{attrs:{class:"hljs-tag"}},[s._v("</"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("<"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"2"')]),s._v(">")]),s._v("2"),t("span",{attrs:{class:"hljs-tag"}},[s._v("</"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("<"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"3"')]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v(":disabled")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"true"')]),s._v(">")]),s._v("3"),t("span",{attrs:{class:"hljs-tag"}},[s._v("</"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n "),t("span",{attrs:{class:"hljs-tag"}},[s._v("<"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"4"')]),s._v(" "),t("span",{attrs:{class:"hljs-attr"}},[s._v(":disabled")]),s._v("="),t("span",{attrs:{class:"hljs-string"}},[s._v('"true"')]),s._v(">")]),s._v("4"),t("span",{attrs:{class:"hljs-tag"}},[s._v("</"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n"),t("span",{attrs:{class:"hljs-tag"}},[s._v("</"),t("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox-group")]),s._v(">")]),s._v("\n")])])])])},function(){var s=this,a=s.$createElement,t=s._self._c||a;return t("table",[t("thead",[t("tr",[t("th",[s._v("参数")]),s._v(" "),t("th",[s._v("说明")]),s._v(" "),t("th",[s._v("类型")]),s._v(" "),t("th",[s._v("可选值")]),s._v(" "),t("th",[s._v("默认值")])])]),s._v(" "),t("tbody",[t("tr",[t("td",[s._v("horizontal")]),s._v(" "),t("td",[s._v("是否水平排列")]),s._v(" "),t("td",[s._v("Boolean")]),s._v(" "),t("td",[s._v("true/false")]),s._v(" "),t("td",[s._v("false")])])])])},function(){var s=this,a=s.$createElement,t=s._self._c||a;return t("table",[t("thead",[t("tr",[t("th",[s._v("事件名")]),s._v(" "),t("th",[s._v("说明")]),s._v(" "),t("th",[s._v("参数")])])]),s._v(" "),t("tbody",[t("tr",[t("td",[s._v("input")]),s._v(" "),t("td",[s._v("组内可选项选中状态发生改变时触发")]),s._v(" "),t("td",[s._v("选中的复选框的值的集合,类型数组")])])])])}]}}});
\ No newline at end of file
webpackJsonp([21],{481:function(s,t,a){s.exports=a(569)},569:function(s,t,a){var e=a(11)(null,a(570),null,null,null);s.exports=e.exports},570: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:"Checkbox复选框"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Checkbox复选框-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(" Checkbox 复选框")]),s._v(" "),a("p",[s._v("复选框,可设置其状态、传入特殊 class 以及复选框图标位置。")]),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("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-checkbox")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"checked"')]),s._v(">")]),s._v("\n Checkbox\n"),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n")])]),s._v(" "),a("p",[s._v("如果选中了,则 "),a("code",{pre:!0},[s._v("checked")]),s._v(" 的值就为 "),a("code",{pre:!0},[s._v("true")]),s._v("")])]),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-checkbox")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"checked"')]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v(":disabled")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"true"')]),s._v(">")]),s._v("\n Disabled Checkbox\n"),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n")])]),s._v(" "),a("p",[s._v("设置 "),a("code",{pre:!0},[s._v("disabled")]),s._v(""),a("code",{pre:!0},[s._v("true")]),s._v(" 即为禁用状态。")])]),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-checkbox")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"checked"')]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("position")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"right"')]),s._v(">")]),s._v("\n Position Checkbox\n"),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n")])]),s._v(" "),a("p",[s._v("设置 "),a("code",{pre:!0},[s._v("position")]),s._v(""),a("code",{pre:!0},[s._v("'right'")]),s._v(" 则复选框图标位置在右边。")])]),s._v(" "),a("li",[a("p",[s._v("改变 model 的值")]),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-checkbox")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("v-model")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"checked"')]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("label")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"labelValue"')]),s._v(">")]),s._v("\n Set label Checkbox\n"),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-checkbox")]),s._v(">")]),s._v("\n")])]),s._v(" "),a("p",[s._v("设置 "),a("code",{pre:!0},[s._v("label")]),s._v(",当复选框选中的时候,"),a("code",{pre:!0},[s._v("checked")]),s._v(" 的值就是 "),a("code",{pre:!0},[s._v("'labelValue'")]),s._v(",当未选中的时候,"),a("code",{pre:!0},[s._v("checked")]),s._v(" 的值就是 "),a("code",{pre:!0},[s._v("false")]),s._v(";所以其实在单个复选框的场景下,最好不要设置 "),a("code",{pre:!0},[s._v("label")]),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("disabled")]),s._v(" "),a("td",[s._v("是否被禁用")]),s._v(" "),a("td",[s._v("Boolean")]),s._v(" "),a("td",[s._v("true/false")]),s._v(" "),a("td",[s._v("false")])]),s._v(" "),a("tr",[a("td",[s._v("position")]),s._v(" "),a("td",[s._v("位置")]),s._v(" "),a("td",[s._v("String")]),s._v(" "),a("td",[s._v("left/right")]),s._v(" "),a("td",[s._v("left")])]),s._v(" "),a("tr",[a("td",[s._v("label")]),s._v(" "),a("td",[s._v("如果选中的话,则是把该值映射到 v-model 上")]),s._v(" "),a("td",[s._v("Boolean/String")]),s._v(" "),a("td",[s._v("-")]),s._v(" "),a("td",[s._v("''")])])])])}]}}});
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册