update README.md (#227)
* [bugfix] Checkbox border render error in weixin browser * [bugfix] TreeSelect dependency path error * [bugfix] Swipe should clear autoplay timer when destroyed * [bugfix] Optimize component dependency analyze when build style entry * merge * update yarn.lock * update README.md * update README.md * update README.md * update README.md * update README.md
This commit is contained in:
77
README.md
77
README.md
@@ -11,6 +11,18 @@
|
||||
|
||||
[访问中文版](./README.zh-CN.md)
|
||||
|
||||
## Features
|
||||
|
||||
- Components come from wechat mall business of [YouZan](https://youzan.com)
|
||||
- Extensive documentation and demos.
|
||||
- Support [babel-plugin-import](https://github.com/ant-design/babel-plugin-import)
|
||||
- Unit test coverage over 90%
|
||||
- Not only have the basic components, but also have a lot of business components
|
||||
|
||||
<p align="center">
|
||||
<img alt="feature demo" src="https://img.yzcdn.cn/public_files/2017/09/21/34974ceef63f380373bf3d68ec7907f8.gif">
|
||||
</p >
|
||||
|
||||
## Install
|
||||
|
||||
```shell
|
||||
@@ -18,14 +30,71 @@ npm i -S vant
|
||||
```
|
||||
|
||||
## Quickstart
|
||||
See [Quickstart](https://www.youzanyun.com/zanui/vue#/en-US/component/quickstart).
|
||||
|
||||
## How to contribute
|
||||
|
||||
#### 1. Use [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) (Recommended)
|
||||
```bash
|
||||
# Install babel-plugin-import
|
||||
npm i babel-plugin-import -D
|
||||
```
|
||||
|
||||
```js
|
||||
// set babel config in .babelrc or babel-loader
|
||||
{
|
||||
"plugins": [
|
||||
["import", { "libraryName": "vant", "style": true }]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Then you can import components from vant, equivalent to import manually below.
|
||||
|
||||
```js
|
||||
import { Button } from 'vant';
|
||||
```
|
||||
|
||||
#### 2. Manually import
|
||||
|
||||
```js
|
||||
import { Button } from 'vant/lib/button';
|
||||
import 'vant/lib/vant-css/base.css';
|
||||
import 'vant/lib/vant-css/button.css';
|
||||
```
|
||||
|
||||
#### 3. Import all components
|
||||
|
||||
```js
|
||||
import Vue from 'vue';
|
||||
import Vant from 'vant';
|
||||
import 'vant/lib/vant-css/index.css';
|
||||
|
||||
Vue.use(Vant);
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
```html
|
||||
<!-- import style -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/vant/lib/vant-css/index.css" />
|
||||
|
||||
<!-- import script --><script></script>
|
||||
<script src="https://unpkg.com/vant/lib/vant.min.js"></script>
|
||||
```
|
||||
|
||||
See more in [Quickstart](https://www.youzanyun.com/zanui/vue#/en-US/component/quickstart).
|
||||
|
||||
## Contribution
|
||||
Please make sure to read the [Contributing Guide](./.github/CONTRIBUTING.md) before making a pull request.
|
||||
|
||||
## Preview
|
||||
## Browser Support
|
||||
Modern browsers and Android 4.0+, iOS 6+.
|
||||
|
||||
## Links
|
||||
- [Documentation](https://www.youzanyun.com/zanui/vue)
|
||||
- [Change log](https://www.youzanyun.com/zanui/vue#/en-US/component/changelog)
|
||||
- [React UI Zent](https://www.youzanyun.com/zanui/react)
|
||||
- [vue-cli-template-vant](https://github.com/youzan/vue-cli-template-vant)
|
||||
|
||||
## Preview
|
||||
You can scan the following QR code to access the demo:
|
||||
|
||||

|
||||
|
||||
Reference in New Issue
Block a user