wug-ui
v0.1.1
Published
组件库
Downloads
1
Maintainers
Readme
Wug UI
组件库
Installation
npm i wug-ui -S
# for Vue 2.x
npm i wug-ui@1 -S
Usage
Import all components.
import Vue from 'vue';
import Wug from 'wug-ui';
import 'wug-ui/lib/style.css';
Vue.use(Wug);
Or import specified component. (Use babel-plugin-component)
import { Cell, Checklist } from 'wug-ui';
Vue.component(Cell.name, Cell);
Vue.component(Checklist.name, Checklist);
Equals to
import Vue from 'vue';
import Wug from 'wug-ui';
import 'wug-ui/lib/style.css';
Vue.use(Wug);
// import specified component
import WGRadio from 'wug-ui/lib/radio';
import 'wug-ui/lib/radio/style.css';
Vue.component(WGRadio.name, WGRadio);
babel-plugin-component
- Auto import css file
- Modular import component
Installation
npm i babel-plugin-component -D
Usage
.babelrc
{
"plugins": ["other-plugin", ["component", [
{ "libraryName": "wug-ui", "style": true }
]]]
}
Development
npm run serve
License
MIT