Mobile UI elements for Vue 2.0
npm i qfpay-ui -S
# for Vue 1.x
npm i qfpay-ui@1 -S
Import all components.
import Vue from 'vue';
import Mint from 'qfpay-ui';
import 'qfpay-ui/lib/style.css';
Vue.use(Mint);
Or import specified component. (Use babel-plugin-component)
import { Cell, Checklist } from 'qfpay-ui';
Vue.component(Cell.name, Cell);
Vue.component(Checklist.name, Checklist);
Equals to
import Vue from 'vue';
import Mint from 'qfpay-ui';
import 'qfpay-ui/lib/style.css';
Vue.use(Mint);
// import specified component
import MtRadio from 'qfpay-ui/lib/radio';
import 'qfpay-ui/lib/radio/style.css';
Vue.component(MtRadio.name, MtRadio);
- Auto import css file
- Modular import component
Installation
npm i babel-plugin-component -D
Usage
.babelrc
{
"plugins": ["other-plugin", ["component", [
{ "libraryName": "qfpay-ui", "style": true }
]]]
}
npm run dev
Please make sure to read the Contributing Guide before making a pull request.
MIT