Compare commits

..

No commits in common. "e3238d8fa1786fe7d51da9ce3930c3c97ed1a7b4" and "22ee50576c40c89867f88a0abe7f73e9aee4977f" have entirely different histories.

5 changed files with 5 additions and 38 deletions

View File

@ -16,17 +16,6 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/).
## Details
### [v2.12.39](https://github.com/youzan/vant/compare/v2.12.38...v2.12.39)
`2022-01-15`
**Bug Fixes**
- DatetimePicker: error in some edge cases [#10186](https://github.com/youzan/vant/issues/10186)
- ImagePreview: incorrectly closed after zooming [#10191](https://github.com/youzan/vant/issues/10191)
- NavBar: get correct height in mobile safari [#10190](https://github.com/youzan/vant/issues/10190)
- Tabbar: get correct height in mobile safari [#10185](https://github.com/youzan/vant/issues/10185)
### [v2.12.38](https://github.com/youzan/vant/compare/v2.12.37...v2.12.38)
`2022-01-10`

View File

@ -16,17 +16,6 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。
## 更新内容
### [v2.12.39](https://github.com/youzan/vant/compare/v2.12.38...v2.12.39)
`2022-01-15`
**Bug Fixes**
- DatetimePicker: 修复边界情况下可能报错的问题 [#10186](https://github.com/youzan/vant/issues/10186)
- ImagePreview: 修复快速缩放导致预览关闭的问题 [#10191](https://github.com/youzan/vant/issues/10191)
- NavBar: 修复在 safari 上占位元素高度错误的问题 [#10190](https://github.com/youzan/vant/issues/10190)
- Tabbar: 修复在 safari 上占位元素高度错误的问题 [#10185](https://github.com/youzan/vant/issues/10185)
### [v2.12.38](https://github.com/youzan/vant/compare/v2.12.37...v2.12.38)
`2022-01-10`

View File

@ -1,6 +1,6 @@
{
"name": "vant",
"version": "2.12.39",
"version": "2.12.38",
"description": "Mobile UI Components built on Vue",
"main": "lib/index.js",
"module": "es/index.js",

View File

@ -139,12 +139,11 @@ export default {
this.touchStart(event);
this.touchStartTime = new Date();
this.fingerNum = touches.length;
this.startMoveX = this.moveX;
this.startMoveY = this.moveY;
this.moving = this.fingerNum === 1 && this.scale !== 1;
this.zooming = this.fingerNum === 2 && !offsetX;
this.moving = touches.length === 1 && this.scale !== 1;
this.zooming = touches.length === 2 && !offsetX;
if (this.zooming) {
this.startScale = this.scale;
@ -217,14 +216,10 @@ export default {
},
checkTap() {
if (this.fingerNum > 1) {
return;
}
const { offsetX = 0, offsetY = 0 } = this;
const deltaTime = new Date() - this.touchStartTime;
const TAP_TIME = 250;
const TAP_OFFSET = 5;
const TAP_OFFSET = 10;
if (
offsetX < TAP_OFFSET &&

View File

@ -31,13 +31,7 @@ export default createComponent({
mounted() {
if (this.placeholder && this.fixed) {
const setHeight = () => {
this.height = this.$refs.navBar.getBoundingClientRect().height;
};
setHeight();
// https://github.com/youzan/vant/issues/10131
setTimeout(setHeight, 100);
this.height = this.$refs.navBar.getBoundingClientRect().height;
}
},