Socket
Socket
Sign inDemoInstall

vant

Package Overview
Dependencies
Maintainers
2
Versions
565
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vant

有赞vue wap组件库


Version published
Weekly downloads
43K
decreased by-8.25%
Maintainers
2
Weekly downloads
 
Created
Source

有赞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 协议,请自由地享受和参与开源。

Keywords

FAQs

Package last updated on 26 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc