nek-vue
UI components based on [Vue.js]
Install nek-vue
using npm
npm install nek-vue --save
Usage
Vue
按需引用
借助 babel-plugin-component,我们可以只引入需要的组件,以达到减小项目体积的目的。
首先,安装 babel-plugin-component:
npm install babel-plugin-component -D
然后,在 .babelrc 添加如下配置:
"plugins": [["component", [ { "libraryName": "nek-vue", "styleLibraryName": "style", "styleLibrary": { "name": "/", "base": true, "path": "[module]/style/index.css", "mixin": false }, "camel2Dash": true } ]]]
接下来,如果你只希望引入部分组件,比如 Button 和 Select,那么需要在 main.js 中写入以下内容:
Vue
LICENSE
MIT