docs: add vant use install guide (#10058)

This commit is contained in:
neverland 2021-12-17 20:48:16 +08:00 committed by GitHub
parent a06f2666a1
commit 0e0339ef6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 1 deletions

View File

@ -4,6 +4,21 @@
Vant provide some built-in composition APIs, you can directly use these APIs for development.
### Install
Although `@vant/use` is already included in Vant's dependencies, it is still recommended to install this package explicitly:
```shell
# with npm
npm i @vant/use
# with yarn
yarn add @vant/use
# with pnpm
pnpm add @vant/use
```
### Demo
```js

View File

@ -2,7 +2,22 @@
### 介绍
Vant 内置了一系列的组合式 API对于安装了 `vant` 的项目,可以直接使用这些 API 进行开发。
Vant 底层依赖了 `@vant/use` 包,其中内置了一系列的组合式 API。对于使用了 Vant 的项目,可以复用这些 API 进行开发。
### 安装
虽然 Vant 的依赖中已经包含了 `@vant/use`,但我们仍然推荐显式地安装它:
```shell
# with npm
npm i @vant/use
# with yarn
yarn add @vant/use
# with pnpm
pnpm add @vant/use
```
### 示例