README.md使用英文文档 (#66)

This commit is contained in:
张敏
2017-08-04 16:33:45 +08:00
committed by GitHub
parent e46964c3df
commit 90909ddedf
4 changed files with 1057 additions and 1847 deletions
+15 -14
View File
@@ -9,27 +9,28 @@
[![Build Status](https://travis-ci.org/youzan/vant.svg?branch=master)](https://travis-ci.org/youzan/vant) [![Coverage Status](https://img.shields.io/codecov/c/github/youzan/vant/dev.svg)](https://codecov.io/github/youzan/vant?branch=dev) [![npm version](https://img.shields.io/npm/v/vant.svg?style=flat)](https://www.npmjs.com/package/vant) [![downloads](https://img.shields.io/npm/dt/vant.svg)](https://www.npmjs.com/package/vant)
## 一、安装
[访问中文版](./README.zh-CN.md)
## Install
```shell
npm i -S vant
```
## 二、使用
## Usage
### 1. 导入所有组件
### Import all components
```javascript
import Vue from 'vue';
import vant from 'vant';
// 你也可以使用自己的主题
import 'vant/lib/vant-css/index.css';
Vue.use(vant);
```
### 2. 按需导入组件
### On demand
```javascript
import Vue from 'vue';
@@ -41,30 +42,30 @@ Vue.component(Button.name, Button);
Vue.component(Cell.name, Cell);
```
## 三、开发
## Development
### 1. 新建一个组件
### Add a new component
```shell
make init componentName
```
### 2. 示例预览
### Start coding
`docs/nav.config.json`文件里合适的地方写入组件声明,根据组件类型(JS组件,CSS组件,Form等)进行区分 在`docs/examples-docs`目录里新建同名的md文件,如`waterfall.md`,在项目的根目录下执行以下命令,启动server:
Start development mode:
```shell
npm run dev
```
浏览器访问[http://localhost:8080](http://localhost:8080)就可以看到所有组件的示例了。
Visit [http://localhost:8080](http://localhost:8080) to see an example of all components.
## 四、手机预览
## Preview
可以手机扫码以下二维码访问手机端demo
You can scan the following QR code to access the demo
![zanui_vue_mobile_qrcode](https://img.yzcdn.cn/v2/image/youzanyun/zanui/pc/zanui_vue_mobile_preview_03.png)
## 五、开源协议
## LICENSE
本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源。
[MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89)