release: @vant/use 1.3.3 (#9840)

This commit is contained in:
neverland 2021-11-11 19:20:10 +08:00 committed by GitHub
parent 218567437c
commit 933d1bb2cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 39 deletions

View File

@ -1,13 +1,17 @@
# Vant Use # Vant Use
Vant Use 是从 Vant 实际应用场景中沉淀的 Vue 组合式 API 库。 Built-in composition APIs of Vant.
## 安装 ## Install
```bash #### NPM
# 通过 npm 安装
```shell
npm i @vant/use -S npm i @vant/use -S
```
# 通过 yarn 安装 #### YARN
```shell
yarn add @vant/use yarn add @vant/use
``` ```

View File

@ -1,144 +1,149 @@
# 更新日志 # Changelog
### v1.3.3
- Allow to call useWindowSize outside setup
- Improve usePageVisibility event bindings performance
### v1.3.2 ### v1.3.2
- 移除 passive event 的 polyfill -Remove passive event polyfill
### v1.3.1 ### v1.3.1
- 移除 requestAnimationFrame 的 polyfill - Remove requestAnimationFrame polyfill
### v1.3.0 ### v1.3.0
- 新增 `useCustomFieldValue` 方法 - Added `useCustomFieldValue` method
### v1.2.2 ### v1.2.2
`2021-07-22` `2021-07-22`
- `useEventListener`: 修复 `invalid watch source` 问题 - `useEventListener`: fix `invalid watch source` issue
### v1.2.1 ### v1.2.1
`2021-07-21` `2021-07-21`
- `useEventListener` 现在会监听 target 的变化,并重新监听事件 - `useEventListener` will now watch the target changes and re-listen the events
### v1.2.0 ### v1.2.0
`2021-07-12` `2021-07-12`
- 调整 `useParent``useChildren` 的类型定义 - Adjust type definition of `useParent` and `useChildren`
### v1.1.2 ### v1.1.2
`2021-04-22` `2021-04-22`
- 修复 `useScrollParent` 在 SSR 下报错的问题 - Fix the issue of `useScrollParent` reporting errors under SSR
### v1.1.1 ### v1.1.1
`2021-04-16` `2021-04-16`
- 移除 `@babel/runtime` 依赖 - Remove `@babel/runtime` dependency
### v1.1.0 ### v1.1.0
`2021-04-06` `2021-04-06`
- 构建结果由 ES5 调整为 ES6 - Compile to ES6 instead of ES5
### v1.0.5 ### v1.0.5
`2021-02-13` `2021-02-13`
- 优化 `useRect` 的返回值类型,始终返回 `DOMRect` - Optimize the return value type of `useRect`, always return `DOMRect`
### v1.0.4 ### v1.0.4
`2021-02-12` `2021-02-12`
- `useChildren` 支持通过泛型定义 Children 的类型 - `useChildren` supports defining the type of Children through generics
### v1.0.3 ### v1.0.3
`2021-02-10` `2021-02-10`
- 当 parent 不存在时,`useParent` 现在返回的 index 为 -1 而不是 undefined - When parent does not exist, `useParent` now returns index -1 instead of undefined
### v1.0.2 ### v1.0.2
`2021-01-01` `2021-01-01`
- 修复 useToggle 类型定义错误的问题 - Fix the problem of incorrect useToggle type definition
### v1.0.1 ### v1.0.1
`2020-12-27` `2020-12-27`
- 导出个别内部方法供 Vant 使用 - Export individual internal methods for use by Vant
### v1.0.0 ### v1.0.0
`2020-12-15` `2020-12-15`
- 优化构建产物体积 - Optimize the volume of the build product
### v0.1.0 ### v0.1.0
`2020-11-11` `2020-11-11`
- 新增 `onMountedOrActivated` 方法 - Added `onMountedOrActivated` method
### v0.0.8 ### v0.0.8
`2020-10-09` `2020-10-09`
- 改进类型定义 - Improve type definition
### v0.0.7 ### v0.0.7
`2020-10-06` `2020-10-06`
- 修复 `useCountDown` 未被导出的问题 - Fix the problem that `useCountDown` is not exported
### v0.0.6 ### v0.0.6
`2020-10-06` `2020-10-06`
- 导出所有类型定义 - Export all type definitions
### v0.0.5 ### v0.0.5
`2020-10-06` `2020-10-06`
- 新增 `useCountDown` 方法 - Added `useCountDown` method
### v0.0.4 ### v0.0.4
`2020-10-05` `2020-10-05`
- 新增 `useRect` 方法 - Added `useRect` method
### v0.0.3 ### v0.0.3
`2020-09-27` `2020-09-27`
- 新增 `useParent` 方法 - Added `useParent` method
- 新增 `useChildren` 方法 - Added `useChildren` method
### v0.0.2 ### v0.0.2
`2020-09-15` `2020-09-15`
- 新增 `useWindowSize` 方法 - Added `useWindowSize` method
### v0.0.1 ### v0.0.1
`2020-09-15` `2020-09-15`
- 新增 `useClickAway` 方法 - Added `useClickAway` method
- 新增 `useEventListener` 方法 - Added `useEventListener` method
- 新增 `usePageVisibility` 方法 - Added `usePageVisibility` method
- 新增 `useScrollParent` 方法 - Added `useScrollParent` method
- 新增 `useToggle` 方法 - Added `useToggle` method

View File

@ -46,7 +46,7 @@
"dependencies": { "dependencies": {
"@vant/icons": "^1.7.1", "@vant/icons": "^1.7.1",
"@vant/popperjs": "^1.1.0", "@vant/popperjs": "^1.1.0",
"@vant/use": "^1.3.2" "@vant/use": "^1.3.3"
}, },
"peerDependencies": { "peerDependencies": {
"vue": "^3.0.0" "vue": "^3.0.0"

10
pnpm-lock.yaml generated
View File

@ -49,7 +49,7 @@ importers:
'@vant/cli': ^4.0.0-beta.5 '@vant/cli': ^4.0.0-beta.5
'@vant/icons': ^1.7.1 '@vant/icons': ^1.7.1
'@vant/popperjs': ^1.1.0 '@vant/popperjs': ^1.1.0
'@vant/use': ^1.3.2 '@vant/use': ^1.3.3
'@vue/compiler-sfc': ^3.2.20 '@vue/compiler-sfc': ^3.2.20
'@vue/runtime-core': ^3.2.20 '@vue/runtime-core': ^3.2.20
typescript: 4.x typescript: 4.x
@ -58,7 +58,7 @@ importers:
dependencies: dependencies:
'@vant/icons': link:../vant-icons '@vant/icons': link:../vant-icons
'@vant/popperjs': link:../vant-popperjs '@vant/popperjs': link:../vant-popperjs
'@vant/use': link:../vant-use '@vant/use': 1.3.3
devDependencies: devDependencies:
'@vant/area-data': link:../vant-area-data '@vant/area-data': link:../vant-area-data
'@vant/cli': link:../vant-cli '@vant/cli': link:../vant-cli
@ -2335,6 +2335,10 @@ packages:
eslint-visitor-keys: 3.0.0 eslint-visitor-keys: 3.0.0
dev: false dev: false
/@vant/use/1.3.3:
resolution: {integrity: sha512-EM06Wgc+2sy4VhAECBTRd4NuoUdVeprcfClMdAnS1HNibk13XYd8iGNi8XqijWzrIO/KCCgudnDW9Ja/iYy+rA==, tarball: '@vant/use/download/@vant/use-1.3.3.tgz?cache=0&sync_timestamp=1636624316375&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40vant%2Fuse%2Fdownload%2F%40vant%2Fuse-1.3.3.tgz'}
dev: false
/@vitejs/plugin-vue-jsx/1.2.0: /@vitejs/plugin-vue-jsx/1.2.0:
resolution: {integrity: sha1-pCFr27ixKABTfTnjtXEfzy60cO8=, tarball: '@vitejs/plugin-vue-jsx/download/@vitejs/plugin-vue-jsx-1.2.0.tgz'} resolution: {integrity: sha1-pCFr27ixKABTfTnjtXEfzy60cO8=, tarball: '@vitejs/plugin-vue-jsx/download/@vitejs/plugin-vue-jsx-1.2.0.tgz'}
engines: {node: '>=12.0.0'} engines: {node: '>=12.0.0'}
@ -7485,7 +7489,7 @@ packages:
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
/source-map/0.6.1: /source-map/0.6.1:
resolution: {integrity: sha1-dHIq8y6WFOnCh6jQu95IteLxomM=, tarball: source-map/download/source-map-0.6.1.tgz?cache=0&sync_timestamp=1632822727980&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fsource-map%2Fdownload%2Fsource-map-0.6.1.tgz} resolution: {integrity: sha1-dHIq8y6WFOnCh6jQu95IteLxomM=, tarball: source-map/download/source-map-0.6.1.tgz}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
/source-map/0.7.3: /source-map/0.7.3: