mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
* fix: loading small style, search style and dialog style * fix: scroll to top * fix mobile scroll * fix scroll to top * 文档细节优化
35 lines
552 B
Markdown
35 lines
552 B
Markdown
## Vant
|
|
|
|
一套`Vue 2.0`的基础组件。
|
|
<br>A collection of essential UI components written with Vue 2.0.
|
|
|
|
### 安装
|
|
|
|
```shell
|
|
npm i vant -S
|
|
```
|
|
|
|
### 引入组件
|
|
|
|
#### 完整引入
|
|
|
|
```javascript
|
|
import Vue from 'vue';
|
|
import ZanUI from 'vant';
|
|
import 'vant/lib/vant-css/index.css';
|
|
|
|
Vue.use(ZanUI);
|
|
```
|
|
|
|
#### 按需引入
|
|
|
|
```javascript
|
|
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);
|
|
```
|