mirror of
https://github.com/youzan/vant.git
synced 2026-03-11 02:18:48 +08:00
b7dd98c428987769b495c8d5350056a25c20b80d
* move contribute to .github * fix wrong name * move markdown.md to .github
A Vue.js 2.0 Mobile UI at YouZan
Install
npm i -S vant
Usage
Use babel-plugin-import (Recommended)
// .babelrc or babel-loader option
{
"plugins": [
["import", { "libraryName": "vant", "style": true }]
]
}
Then you can import components from vant, equivalent to import manually below.
// import js and css modularly, parsed by babel-plugin-import
import { Button } from 'vant';
Manually import
import { Button } from 'vant';
import 'vant/lib/vant-css/button.css';
Import all components
import Vue from 'vue';
import vant from 'vant';
import 'vant/lib/vant-css/index.css';
Vue.use(vant);
How to contribute
Please make sure to read the Contributing Guide before making a pull request.
Preview
You can scan the following QR code to access the demo:
LICENSE
Languages
TypeScript
66.2%
Vue
16.3%
Less
10.6%
JavaScript
6.7%
HTML
0.1%

