JSPM

vant

0.6.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 95922
  • Score
    100M100P100Q145107F
  • License ISC

有赞vue wap组件库

Package Exports

  • vant
  • vant/lib/actionsheet
  • vant/lib/badge
  • vant/lib/badge-group
  • vant/lib/button
  • vant/lib/card
  • vant/lib/cell
  • vant/lib/cell-group
  • vant/lib/checkbox
  • vant/lib/checkbox-group
  • vant/lib/col
  • vant/lib/datetime-picker
  • vant/lib/dialog
  • vant/lib/field
  • vant/lib/icon
  • vant/lib/image-preview
  • vant/lib/lazyload
  • vant/lib/loading
  • vant/lib/panel
  • vant/lib/picker
  • vant/lib/popup
  • vant/lib/progress
  • vant/lib/quantity
  • vant/lib/radio
  • vant/lib/radio-group
  • vant/lib/row
  • vant/lib/search
  • vant/lib/step
  • vant/lib/steps
  • vant/lib/swipe
  • vant/lib/swipe-item
  • vant/lib/switch
  • vant/lib/tab
  • vant/lib/tabs
  • vant/lib/tag
  • vant/lib/toast
  • vant/lib/uploader
  • vant/lib/utils/clickoutside
  • vant/lib/utils/merge
  • vant/lib/utils/scroll
  • vant/lib/vant-css/dialog.css
  • vant/lib/vant-css/index.css
  • vant/lib/waterfall

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vant) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

有赞logo

项目logo

A Vue.js 2.0 Mobile UI at YouZan

Build Status Coverage Status npm version downloads

一、安装

npm i -S vant

二、使用

1. 导入所有组件

import Vue from 'vue';
import vant from 'vant';
// 你也可以使用自己的主题
import 'vant/lib/vant-css/index.css';

Vue.use(vant);

2. 按需导入组件

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

三、开发

1. 新建一个组件

make init componentName

2. 示例预览

docs/nav.config.json文件里合适的地方写入组件声明,根据组件类型(JS组件,CSS组件,Form等)进行区分 在docs/examples-docs目录里新建同名的md文件,如waterfall.md,在项目的根目录下执行以下命令,启动server:

npm run dev

浏览器访问http://localhost:8080就可以看到所有组件的示例了。

四、手机预览

可以手机扫码以下二维码访问手机端demo:

zanui_vue_mobile_qrcode

五、开源协议

本项目基于 MIT 协议,请自由地享受和参与开源。