mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-09 22:19:45 +08:00
readme
This commit is contained in:
parent
b19aceddb7
commit
6861dc3791
14
README.md
14
README.md
@ -9,7 +9,7 @@
|
|||||||
## 一、安装
|
## 一、安装
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
ynpm install @youzan/zanui-vue
|
ynpm install vant
|
||||||
```
|
```
|
||||||
|
|
||||||
## 二、使用
|
## 二、使用
|
||||||
@ -19,20 +19,20 @@ ynpm install @youzan/zanui-vue
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import ZanUI from '@youzan/zanui-vue';
|
import vant from 'vant';
|
||||||
// 你也可以使用自己的主题
|
// 你也可以使用自己的主题
|
||||||
import '@youzan/zanui-vue/lib/zanui-css/index.css';
|
import 'vant/lib/vant-css/index.css';
|
||||||
|
|
||||||
Vue.use(ZanUI);
|
Vue.use(vant);
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. 按需导入组件
|
### 2. 按需导入组件
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { Button, Cell } from '@youzan/zanui-vue';
|
import { Button, Cell } from 'vant';
|
||||||
import '@youzan/zanui-vue/lib/zanui-css/button.css';
|
import 'vant/lib/vant-css/button.css';
|
||||||
import '@youzan/zanui-vue/lib/zanui-css/cell.css';
|
import 'vant/lib/vant-css/cell.css';
|
||||||
|
|
||||||
Vue.component(Button.name, Button);
|
Vue.component(Button.name, Button);
|
||||||
Vue.component(Cell.name, Cell);
|
Vue.component(Cell.name, Cell);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user