text: webpackJsonp([70],{"10ZE":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:"Quickstart"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Quickstart-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(" Quick start")]),s._v(" "),s._m(0),s._v(" "),a("h3",{attrs:{id:"CLI"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-CLI-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(" CLI")]),s._v(" "),a("h4",{attrs:{id:"vue-cli>=3"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-vue-cli>=3-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(" vue-cli >= 3")]),s._v(" "),s._m(1),s._v(" "),s._m(2),s._v(" "),a("h4",{attrs:{id:"vue-cli<3"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-vue-cli<3-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(" vue-cli < 3")]),s._v(" "),s._m(3),s._v(" "),s._m(4),s._v(" "),s._m(5),s._v(" "),s._m(6),s._v(" "),a("h3",{attrs:{id:"Install"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Install-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(" Install")]),s._v(" "),s._m(7),s._v(" "),a("h4",{attrs:{id:"NPM"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-NPM-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(" NPM")]),s._v(" "),s._m(8),s._v(" "),a("p",[s._v("Since cube-ui support two compile ways such as [post-compile] (#/en-US/docs/post-compile) and normal compile with webpack 2+(by default using post-compile), you need to modify your application's dependencies and configuration before using it.")]),s._v(" "),s._m(9),s._v(" "),a("h4",{attrs:{id:"CDN"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-CDN-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(" CDN")]),s._v(" "),s._m(10),s._v(" "),a("h3",{attrs:{id:"Usage"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Usage-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(" Usage")]),s._v(" "),a("h4",{attrs:{id:"Fullyimport"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Fullyimport-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(" Fully import")]),s._v(" "),a("p",[s._v("Commonly in the entry file:")]),s._v(" "),s._m(11),s._v(" "),a("h4",{attrs:{id:"Importondemand"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Importondemand-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(" Import on demand")]),s._v(" "),s._m(12),s._v(" "),s._m(13),s._v(" "),a("p",[s._v("Then register globally:")]),s._v(" "),s._m(14),s._v(" "),a("p",[s._v("All the components and modules that can be imported on demand are listed below:")]),s._v(" "),s._m(15),s._v(" "),s._m(16),s._v(" "),s._m(17),s._v(" "),a("h4",{attrs:{id:"Examples"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Examples-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(" Examples")]),s._v(" "),s._m(18),s._v(" "),a("h3",{attrs:{id:"TypeScriptDevelopmentTooling"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-TypeScriptDevelopmentTooling-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(" TypeScript Development Tooling")]),s._v(" "),a("p",[s._v("We will start to provide better support for TypeScript in v1.12.39.")]),s._v(" "),s._m(19),s._v(" "),a("h4",{attrs:{id:"TypeScript"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-TypeScript-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(" TypeScript")]),s._v(" "),s._m(20),s._v(" "),a("h4",{attrs:{id:"VisualStudioCode"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-VisualStudioCode-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(" Visual Studio Code")]),s._v(" "),s._m(21),s._v(" "),a("h4",{attrs:{id:"Vetur"}},[a("a",{staticClass:"anchor",attrs:{href:"#cube-Vetur-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(" Vetur")]),s._v(" "),s._m(22)])},staticRenderFns:[function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ul",[a("li",[a("a",{attrs:{href:"https://github.com/cube-ui/cube-application-guide"}},[s._v("Application Guide")])]),s._v(" "),a("li",[s._v("Have problems? See "),a("a",{attrs:{href:"https://github.com/cube-ui/question-answer/issues"}},[s._v("QA")])]),s._v(" "),a("li",[s._v("In nuxt application, see "),a("a",{attrs:{href:"https://github.com/cube-ui/cube-nuxt-demo"}},[s._v("demo repo")])])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[s._v("If you are using vue-cli@3, you can use "),a("a",{attrs:{href:"https://github.com/cube-ui/vue-cli-plugin-cube-ui"}},[s._v("vue-cli-plugin-cube-ui")]),s._v(" plugin. After you inited your project, just run "),a("code",{pre:!0},[s._v("vue add cube-ui")]),s._v(". About options, see "),a("a",{attrs:{href:"https://github.com/cube-ui/cube-template/wiki"}},[s._v("cube-template WIKI")]),s._v(".")])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[s._v("Then you can see the "),a("a",{staticClass:"anchor",attrs:{href:"#cube-Usage-anchor"}},[s._v("Usage")]),s._v(" part directly.")])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[s._v("If you are going to create a new project with cube-ui, use the "),a("a",{attrs:{href:"https://github.com/cube-ui/cube-template"}},[s._v("cli tools")]),s._v(" base on "),a("a",{attrs:{href:"https://github.com/vuejs/vue-cli"}},[s._v("vue-cli")]),s._v(" to init the config and base code, then you can ignore the "),a("a",{staticClass:"anchor",attrs:{href:"#cube-Install-anchor"}},[s._v("Install")]),s._v(" steps and see the "),a("a",{staticClass:"anchor",attrs:{href:"#cube-Usage-anchor"}},[s._v("Usage")]),s._v(" part directly.")])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-shell"}},[a("span",{attrs:{class:"hljs-meta"}},[s._v("$")]),a("span",{attrs:{class:"bash"}},[s._v(" vue init cube-ui/cube-template projectname")]),s._v("\n")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[s._v("About cube-template special options: "),a("a",{attrs:{href:"https://github.com/cube-ui/cube-template/wiki"}},[s._v("cube-template WIKI")]),s._v(".")])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[s._v("If you are going to use cube-ui in an existing project, see the "),a("a",{staticClass:"anchor",attrs:{href:"#cube-Install-anchor"}},[s._v("Install")]),s._v(" part first.")])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("blockquote",[a("p",[s._v("This section only used in the case of vue-cli < 3")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-shell"}},[a("span",{attrs:{class:"hljs-meta"}},[s._v("$")]),a("span",{attrs:{class:"bash"}},[s._v(" npm install cube-ui --save")]),s._v("\n")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ul",[a("li",[a("p",[s._v("post-compile")]),s._v(" "),a("ol",[a("li",[s._v("Modify package.json and install the dependencies")])]),s._v(" "),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-json"}},[s._v("{\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// webpack-transform-modules-plugin depends on transformModules")]),s._v("\n  "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"transformModules"')]),s._v(": {\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"cube-ui"')]),s._v(": {\n      "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"transform"')]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v('"cube-ui/src/modules/${member}"')]),s._v(",\n      "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"kebabCase"')]),s._v(": "),a("span",{attrs:{class:"hljs-literal"}},[s._v("true")]),s._v("\n    }\n  },\n  "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"devDependencies"')]),s._v(": {\n    "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// add stylus dependencies")]),s._v("\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"stylus"')]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v('"^0.54.5"')]),s._v(",\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"stylus-loader"')]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v('"^2.1.1"')]),s._v(",\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"webpack-post-compile-plugin"')]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v('"^1.0.0"')]),s._v(",\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"webpack-transform-modules-plugin"')]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v('"^0.4.3"')]),s._v("\n  }\n}\n")])]),s._v(" "),a("ol",{attrs:{start:"2"}},[a("li",[s._v("Modify webpack.base.conf.js")])]),s._v(" "),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-js"}},[a("span",{attrs:{class:"hljs-keyword"}},[s._v("var")]),s._v(" PostCompilePlugin = "),a("span",{attrs:{class:"hljs-built_in"}},[s._v("require")]),s._v("("),a("span",{attrs:{class:"hljs-string"}},[s._v("'webpack-post-compile-plugin'")]),s._v(")\n"),a("span",{attrs:{class:"hljs-keyword"}},[s._v("var")]),s._v(" TransformModulesPlugin = "),a("span",{attrs:{class:"hljs-built_in"}},[s._v("require")]),s._v("("),a("span",{attrs:{class:"hljs-string"}},[s._v("'webpack-transform-modules-plugin'")]),s._v(")\n"),a("span",{attrs:{class:"hljs-built_in"}},[s._v("module")]),s._v(".exports = {\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n  "),a("span",{attrs:{class:"hljs-attr"}},[s._v("plugins")]),s._v(": [\n    "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n    "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" PostCompilePlugin(),\n    "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" TransformModulesPlugin()\n  ]\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n}\n")])]),s._v(" "),a("ol",{attrs:{start:"3"}},[a("li",[s._v("Modify "),a("code",{pre:!0},[s._v("exports.cssLoaders")]),s._v(" function in build/utils.js")])]),s._v(" "),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-js"}},[s._v("exports.cssLoaders = "),a("span",{attrs:{class:"hljs-function"}},[a("span",{attrs:{class:"hljs-keyword"}},[s._v("function")]),s._v(" ("),a("span",{attrs:{class:"hljs-params"}},[s._v("options")]),s._v(") ")]),s._v("{\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n  "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" stylusOptions = {\n    "),a("span",{attrs:{class:"hljs-string"}},[s._v("'resolve url'")]),s._v(": "),a("span",{attrs:{class:"hljs-literal"}},[s._v("true")]),s._v("\n  }\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// https://vue-loader.vuejs.org/en/configurations/extract-css.html")]),s._v("\n  "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("return")]),s._v(" {\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("css")]),s._v(": generateLoaders(),\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("postcss")]),s._v(": generateLoaders(),\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("less")]),s._v(": generateLoaders("),a("span",{attrs:{class:"hljs-string"}},[s._v("'less'")]),s._v("),\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("sass")]),s._v(": generateLoaders("),a("span",{attrs:{class:"hljs-string"}},[s._v("'sass'")]),s._v(", { "),a("span",{attrs:{class:"hljs-attr"}},[s._v("indentedSyntax")]),s._v(": "),a("span",{attrs:{class:"hljs-literal"}},[s._v("true")]),s._v(" }),\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("scss")]),s._v(": generateLoaders("),a("span",{attrs:{class:"hljs-string"}},[s._v("'sass'")]),s._v("),\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("stylus")]),s._v(": generateLoaders("),a("span",{attrs:{class:"hljs-string"}},[s._v("'stylus'")]),s._v(", stylusOptions),\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("styl")]),s._v(": generateLoaders("),a("span",{attrs:{class:"hljs-string"}},[s._v("'stylus'")]),s._v(", stylusOptions)\n  }\n}\n")])]),s._v(" "),a("ol",{attrs:{start:"4"}},[a("li",[s._v("Modify vue-loader.conf.js")])]),s._v(" "),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-javascript"}},[a("span",{attrs:{class:"hljs-built_in"}},[s._v("module")]),s._v(".exports = {\n  "),a("span",{attrs:{class:"hljs-attr"}},[s._v("loaders")]),s._v(": utils.cssLoaders({\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("sourceMap")]),s._v(": sourceMapEnabled,\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("extract")]),s._v(": "),a("span",{attrs:{class:"hljs-literal"}},[s._v("false")]),s._v("\n  }),\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n}\n\n")])]),s._v(" "),a("p",[s._v("See "),a("a",{attrs:{href:"https://github.com/vuejs-templates/webpack/pull/970/files"}},[s._v("https://github.com/vuejs-templates/webpack/pull/970/files")])])]),s._v(" "),a("li",[a("p",[s._v("Normal compile")]),s._v(" "),a("ol",[a("li",[s._v("Modify package.json and install the dependencies")])]),s._v(" "),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-json"}},[s._v("{\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// webpack-transform-modules-plugin depends on transformModules")]),s._v("\n  "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"transformModules"')]),s._v(": {\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"cube-ui"')]),s._v(": {\n      "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"transform"')]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v('"cube-ui/lib/${member}"')]),s._v(",\n      "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"kebabCase"')]),s._v(": "),a("span",{attrs:{class:"hljs-literal"}},[s._v("true")]),s._v(",\n      "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"style"')]),s._v(": {\n        "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"ignore"')]),s._v(": ["),a("span",{attrs:{class:"hljs-string"}},[s._v('"create-api"')]),s._v(", "),a("span",{attrs:{class:"hljs-string"}},[s._v('"better-scroll"')]),s._v(", "),a("span",{attrs:{class:"hljs-string"}},[s._v('"locale"')]),s._v("]\n      }\n    }\n  },\n  "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"devDependencies"')]),s._v(": {\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v('"webpack-transform-modules-plugin"')]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v('"^0.4.3"')]),s._v("\n  }\n}\n")])]),s._v(" "),a("ol",{attrs:{start:"2"}},[a("li",[s._v("Modify webpack config")])]),s._v(" "),a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-js"}},[a("span",{attrs:{class:"hljs-comment"}},[s._v("// webpack.config.js")]),s._v("\n"),a("span",{attrs:{class:"hljs-keyword"}},[s._v("var")]),s._v(" TransformModulesPlugin = "),a("span",{attrs:{class:"hljs-built_in"}},[s._v("require")]),s._v("("),a("span",{attrs:{class:"hljs-string"}},[s._v("'webpack-transform-modules-plugin'")]),s._v(")\n"),a("span",{attrs:{class:"hljs-built_in"}},[s._v("module")]),s._v(".exports = {\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n  "),a("span",{attrs:{class:"hljs-attr"}},[s._v("resolve")]),s._v(": {\n    "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("alias")]),s._v(": {\n      "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n      "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cube-ui'")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cube-ui/lib'")]),s._v("\n      "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n    }\n    "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n  }\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n  "),a("span",{attrs:{class:"hljs-attr"}},[s._v("plugins")]),s._v(": [\n    "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n    "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("new")]),s._v(" TransformModulesPlugin()\n  ]\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n}\n")])])])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return 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("script")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("src")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"https://unpkg.com/cube-ui/lib/cube.min.js"')]),s._v(">")]),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("script")]),s._v(">")]),s._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{attrs:{class:"hljs-name"}},[s._v("link")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("rel")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"stylesheet"')]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("href")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"https://unpkg.com/cube-ui/lib/cube.min.css"')]),s._v(">")]),s._v("\n")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-javascript"}},[a("span",{attrs:{class:"hljs-keyword"}},[s._v("import")]),s._v(" Vue "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("from")]),s._v(" "),a("span",{attrs:{class:"hljs-string"}},[s._v("'vue'")]),s._v("\n"),a("span",{attrs:{class:"hljs-keyword"}},[s._v("import")]),s._v(" Cube "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("from")]),s._v(" "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cube-ui'")]),s._v("\n\nVue.use(Cube)\n")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-javascript"}},[a("span",{attrs:{class:"hljs-keyword"}},[s._v("import")]),s._v(" {\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("/* eslint-disable no-unused-vars */")]),s._v("\n  Style,\n  Button\n} "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("from")]),s._v(" "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cube-ui'")]),s._v("\n")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[a("strong",[s._v("Notice:")]),s._v(" In this case, you also need to import "),a("a",{attrs:{href:"#/en-US/docs/style"}},[s._v("style module")]),s._v(".")])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-js"}},[a("span",{attrs:{class:"hljs-comment"}},[s._v("// register globally")]),s._v("\nVue.use(Button)\n"),a("span",{attrs:{class:"hljs-comment"}},[s._v("// ...")]),s._v("\n")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-js"}},[a("span",{attrs:{class:"hljs-keyword"}},[s._v("import")]),s._v(" {\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// basic style")]),s._v("\n  Style,\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// basic")]),s._v("\n  Button,\n  Loading,\n  Tip,\n  Toolbar,\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// form")]),s._v("\n  Checkbox,\n  CheckboxGroup,\n  Radio,\n  Checker,\n  Input,\n  Textarea,\n  Select,\n  Switch,\n  Rate,\n  Validator,\n  Upload,\n  Form,\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// popup")]),s._v("\n  Popup,\n  Toast,\n  Picker,\n  CascadePicker,\n  DatePicker,\n  TimePicker,\n  SegmentPicker,\n  Dialog,\n  ActionSheet,\n  Drawer,\n  "),a("span",{attrs:{class:"hljs-comment"}},[s._v("// scroll")]),s._v("\n  Scroll,\n  Slide,\n  IndexList,\n  Swipe\n} "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("from")]),s._v(" "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cube-ui'")]),s._v("\n")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[s._v("You can also import "),a("a",{attrs:{href:"#/en-US/docs/create-api"}},[s._v("create-api")]),s._v(" and "),a("a",{attrs:{href:"#/en-US/docs/better-scroll"}},[s._v("better-scroll")]),s._v(" module:")])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("pre",{pre:!0},[a("code",{attrs:{"v-pre":"",class:"language-js"}},[a("span",{attrs:{class:"hljs-keyword"}},[s._v("import")]),s._v(" { createAPI, BetterScroll, Locale } "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("from")]),s._v(" "),a("span",{attrs:{class:"hljs-string"}},[s._v("'cube-ui'")]),s._v("\n")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return 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("template")]),s._v(">")]),s._v("\n  "),a("span",{attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-button")]),s._v(" "),a("span",{attrs:{class:"hljs-attr"}},[s._v("@click")]),s._v("="),a("span",{attrs:{class:"hljs-string"}},[s._v('"showDialog"')]),s._v(">")]),s._v("show dialog"),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("cube-button")]),s._v(">")]),s._v("\n"),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("template")]),s._v(">")]),s._v("\n\n"),a("span",{attrs:{class:"hljs-tag"}},[s._v("<"),a("span",{attrs:{class:"hljs-name"}},[s._v("script")]),s._v(">")]),a("span",{attrs:{class:"javascript"}},[s._v("\n  "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("export")]),s._v(" "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("default")]),s._v(" {\n    "),a("span",{attrs:{class:"hljs-attr"}},[s._v("methods")]),s._v(": {\n      showDialog() {\n        "),a("span",{attrs:{class:"hljs-keyword"}},[s._v("this")]),s._v(".$createDialog({\n          "),a("span",{attrs:{class:"hljs-attr"}},[s._v("type")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'alert'")]),s._v(",\n          "),a("span",{attrs:{class:"hljs-attr"}},[s._v("title")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'Alert'")]),s._v(",\n          "),a("span",{attrs:{class:"hljs-attr"}},[s._v("content")]),s._v(": "),a("span",{attrs:{class:"hljs-string"}},[s._v("'dialog content'")]),s._v("\n        }).show()\n      }\n    }\n  }\n")]),a("span",{attrs:{class:"hljs-tag"}},[s._v("</"),a("span",{attrs:{class:"hljs-name"}},[s._v("script")]),s._v(">")]),s._v("\n")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("blockquote",[a("p",[s._v("If you use "),a("a",{attrs:{href:"https://code.visualstudio.com/"}},[s._v("Visual Studio Code")]),s._v(" + "),a("a",{attrs:{href:"https://github.com/vuejs/vetur"}},[s._v("Vetur")]),s._v(" for development")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[s._v("TypeScript version >= "),a("a",{attrs:{href:"https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html"}},[s._v("4.1")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[s._v("Visual Studio Code version >= "),a("a",{attrs:{href:"https://github.com/vuejs/vetur/releases/tag/v0.30.3"}},[s._v("1.52.0")])])},function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("p",[s._v("Vetur version >= "),a("a",{attrs:{href:"https://github.com/microsoft/vscode/releases/tag/1.52.0"}},[s._v("0.30.3")])])}]}},LsOJ:function(s,t,a){var e=a("VU/8")(null,a("10ZE"),null,null,null);s.exports=e.exports},gyX9:function(s,t,a){s.exports=a("LsOJ")}});