ElemeFE / mint-ui
- суббота, 4 июня 2016 г. в 03:12:55
Vue
Mobile UI elements for vue.js
Mobile UI elements for vue.js
npm i mint-ui -S
import all components.
import Vue from 'vue'
import Mint from 'mint-ui';
Vue.use(Mint);
Or import specified component. (Use babel-plugin-component)
import { Cell, Checklist } from 'mint-ui';
Vue.component(Cell.name, Cell);
Vue.component(Checklist.name, Checklist);
Equal to
import Vue from 'vue';
import Mint from 'mint-ui';
import 'mint-ui/lib/style.css';
Vue.use(Mint);
// import specified component
import MtRadio from 'mint-ui/lib/radio';
import 'mint-ui/lib/radio/style.css';
Vue.component(MtRadio.name, MtRadio);
Installation
npm i babel-plugin-component -D
Usage
.babelrc
{
"plugins": ["other-plugin", ["component", [
{ "libraryName": "mint-ui", "style": true }
]]]
}
make dev
make dist
make deploy
MIT