docs: update version description

This commit is contained in:
chenjiahan
2021-01-09 10:41:16 +08:00
parent fde4f40148
commit 663458e9ce
11 changed files with 22 additions and 22 deletions

View File

@@ -2,7 +2,7 @@
### Tips
The current document is the changelog of Vant 3.x. If you want to view the changelog of Vant 2.x, please visit [Vant 2.x Changelog](https://youzan.github.io/vant/#/en-US/changelog).
The current document is the changelog of Vant 3. If you want to view the changelog of Vant 2, please visit [Vant 2 Changelog](https://youzan.github.io/vant/#/en-US/changelog).
### Intro

View File

@@ -2,7 +2,7 @@
### 提示
当前文档为 Vant 3.x 版本的更新日志,如需查询 Vant 2.x 的更新内容,请访问 [Vant 2.x 更新日志](https://youzan.github.io/vant/#/zh-CN/changelog)。
当前文档为 Vant 3 的更新日志,如需查询 Vant 2 的更新内容,请访问 [Vant 2 更新日志](https://youzan.github.io/vant/#/zh-CN/changelog)。
### 介绍

View File

@@ -19,8 +19,8 @@
```bash
# 克隆仓库
# 默认为 dev 分支,包含 Vant 3.x 的代码
# 如果需要在 Vant 2.x 上进行更改,请基于 2.x 分支进行开发
# 默认为 dev 分支,包含 Vant 3 的代码
# 如果需要在 Vant 2 上进行更改,请基于 2.x 分支进行开发
git clone git@github.com:youzan/vant.git
# 安装依赖

View File

@@ -129,7 +129,7 @@ GoodsAction 商品导航组件重命名为 **ActionBar 行动栏**。
### 重命名 get-container 属性
Vue 3.0 中增加了 `Teleport` 组件,提供将组件渲染到任意 DOM 位置的能力Vant 2.x 也通过 `get-container` 属性提供了类似的能力。为了与官方的 API 保持一致Vant 中的 `get-container` 属性将重命名为 `teleport`
Vue 3.0 中增加了 `Teleport` 组件,提供将组件渲染到任意 DOM 位置的能力Vant 2 也通过 `get-container` 属性提供了类似的能力。为了与官方的 API 保持一致Vant 中的 `get-container` 属性将重命名为 `teleport`
```html
<!-- Vant 2 -->
@@ -222,7 +222,7 @@ Vue 3.0 中增加了 `Teleport` 组件,提供将组件渲染到任意 DOM 位
### 注册全局方法
Vant 2.x 中默认提供了 `$toast``$dialog` 等全局方法,但 Vue 3.0 不再支持直接在 Vue 的原型链上挂载方法,因此从 Vant 3.0 开始,使用全局方法前必须先通过 `app.use` 将组件注册到对应的 app 上。
Vant 2 中默认提供了 `$toast``$dialog` 等全局方法,但 Vue 3.0 不再支持直接在 Vue 的原型链上挂载方法,因此从 Vant 3.0 开始,使用全局方法前必须先通过 `app.use` 将组件注册到对应的 app 上。
```js
import { Toast, Dialog, Notify } from 'vant';

View File

@@ -5,10 +5,10 @@
### npm
```bash
# Install vant 2.x for Vue 2 project
# Install Vant 2 for Vue 2 project
npm i vant -S
# Install vant 3.x for Vue 3 project
# Install Vant 3 for Vue 3 project
npm i vant@next -S
```

View File

@@ -11,10 +11,10 @@
在现有项目中使用 Vant 时,可以通过 `npm``yarn` 进行安装:
```bash
# Vue 2 项目,安装 Vant 2.x 版本
# Vue 2 项目,安装 Vant 2
npm i vant -S
# Vue 3 项目,安装 Vant 3.x 版本
# Vue 3 项目,安装 Vant 3
npm i vant@next -S
```

View File

@@ -5,4 +5,4 @@ superman-cdn /vant ./site/*.js
rm -rf site/*.js
gh-pages -d site --add --dest next
gh-pages -d site --add --dest v3