feat: add @vant/compat package (#10806)

* feat: add @vant/compat package

* chore: remove prepare script
This commit is contained in:
neverland
2022-07-09 20:54:27 +08:00
committed by GitHub
parent 1ce400bb7f
commit e998c1be95
14 changed files with 270 additions and 70 deletions
+32
View File
@@ -0,0 +1,32 @@
# @vant/compat
This package provides Vant 3 compatible behavior for Vant 4 users.
## Install
```shell
# with npm
npm i @vant/compat
# with yarn
yarn add @vant/compat
# with pnpm
pnpm add @vant/compat
```
## Usage
```js
// Same as Toast in Vant 3
import { Toast } from '@vant/compat';
// Same as Dialog in Vant 3
import { Dialog } from '@vant/compat';
// Same as Notify in Vant 3
import { Notify } from '@vant/compat';
// Same as ImagePreview in Vant 3
import { ImagePreview } from '@vant/compat';
```