0.8.6 • Published 7 years ago

vant_c v0.8.6

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

Build Status Coverage Status npm version downloads

访问中文版

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);

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:

zanui_vue_mobile_qrcode

LICENSE

MIT