seawave-ui
v1.2.2
Published
A Component Library for Vue.js.
Downloads
2
Readme
Vue.js 2.0 的开发工具包 , 以Element为基础轮子进行二次开发
Element官网
安装
npm install seawave-ui -S
注意:两种方式只能选其一
全局引入
import Vue from 'vue'
import SeawaveUI from 'seawave-ui'
import 'seawave-ui/lib/theme-chalk/index.css';
Vue.use(SeawaveUI)
按需引入
npm install babel-plugin-component -D
babel.config.js
module.exports = {
presets: [
["@babel/preset-env", { "modules": false }]
],
plugins: [
[
"component",
{
"libraryName": "seawave-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
①:main.js
import Vue from 'vue'
import {
Select,
Button
} from 'seawave-ui'
Vue.use(Select)
Vue.use(Button)
②:component.vue
import {Button} from 'seawave-ui'
export default {
components:{
SwButton:Button
}
}