mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
26dd47d4dd155cb496fc50831aefcb02c4235cd5
A Vue.js 2.0 Mobile UI at YouZan
Install
npm i -S vant
Usage
Import all components
import Vue from 'vue';
import vant from 'vant';
import 'vant/lib/vant-css/index.css';
Vue.use(vant);
On demand
import Vue from 'vue';
import { Button, Cell } from 'vant';
import 'vant/lib/vant-css/button.css';
import 'vant/lib/vant-css/cell.css';
Vue.component(Button.name, Button);
Vue.component(Cell.name, Cell);
Development
Add a new component
make init componentName
Start coding
Start development mode:
npm run dev
Visit http://localhost:8080 to see an example of all components.
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%