mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-07-12 17:02:37 +08:00
Compare commits
4 Commits
22ee50576c
...
e3238d8fa1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3238d8fa1 | ||
|
|
02b928086c | ||
|
|
708c3af769 | ||
|
|
6ed16c0770 |
@ -16,6 +16,17 @@ 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`
|
||||
|
||||
@ -16,6 +16,17 @@ 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`
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vant",
|
||||
"version": "2.12.38",
|
||||
"version": "2.12.39",
|
||||
"description": "Mobile UI Components built on Vue",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
||||
@ -139,11 +139,12 @@ export default {
|
||||
this.touchStart(event);
|
||||
this.touchStartTime = new Date();
|
||||
|
||||
this.fingerNum = touches.length;
|
||||
this.startMoveX = this.moveX;
|
||||
this.startMoveY = this.moveY;
|
||||
|
||||
this.moving = touches.length === 1 && this.scale !== 1;
|
||||
this.zooming = touches.length === 2 && !offsetX;
|
||||
this.moving = this.fingerNum === 1 && this.scale !== 1;
|
||||
this.zooming = this.fingerNum === 2 && !offsetX;
|
||||
|
||||
if (this.zooming) {
|
||||
this.startScale = this.scale;
|
||||
@ -216,10 +217,14 @@ 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 = 10;
|
||||
const TAP_OFFSET = 5;
|
||||
|
||||
if (
|
||||
offsetX < TAP_OFFSET &&
|
||||
|
||||
@ -31,7 +31,13 @@ export default createComponent({
|
||||
|
||||
mounted() {
|
||||
if (this.placeholder && this.fixed) {
|
||||
this.height = this.$refs.navBar.getBoundingClientRect().height;
|
||||
const setHeight = () => {
|
||||
this.height = this.$refs.navBar.getBoundingClientRect().height;
|
||||
};
|
||||
|
||||
setHeight();
|
||||
// https://github.com/youzan/vant/issues/10131
|
||||
setTimeout(setHeight, 100);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user