GithubHelp home page GithubHelp logo

unscientificmisaka / vant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from youzan/vant

0.0 1.0 0.0 6.17 MB

A Vue.js 2.0 Mobile UI From YouZan

Home Page: https://www.youzanyun.com/zanui/vue

License: Other

JavaScript 53.44% Makefile 0.11% Shell 1.49% Vue 27.45% CSS 17.51%

vant's Introduction

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

vant's People

Contributors

cookfront avatar w91 avatar pangxie1991 avatar tsxuehu avatar chenjiahan avatar radicalviva avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.