nek-ui by vue


Keywords
vue, components, nek-ui, nek-vue
License
MIT
Install
npm install nek-vue@0.0.13

Documentation

nek-vue

UI components based on [Vue.js]

Build Status npm

Install nek-vue

using npm

npm install nek-vue --save

Usage

import nek from 'nek-vue'
import 'nek-vue/lib/style/index.css'
Vue.use(nek)

按需引用

借助 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 中写入以下内容:

import { Button } from 'nek-vue'
Vue.component(Button.name, Button)

LICENSE

MIT