There was an error while loading. Please reload this page.
1 parent e0781b4 commit 2c6b9d1Copy full SHA for 2c6b9d1
1 file changed
packages/uniapp-components/indexes/indexes.vue
@@ -79,6 +79,7 @@ export default {
79
groupTop: [],
80
sidebar: null,
81
currentTouchAnchor: null,
82
+ touchMoved: false,
83
84
dataCurrent: this.current,
85
};
@@ -256,16 +257,22 @@ export default {
256
257
},
258
259
onTouchMove(e) {
260
+ this.touchMoved = true;
261
this.onAnchorTouch(e);
262
263
264
onTouchCancel() {
265
+ this.touchMoved = false;
266
this.toggleTips(false);
267
268
269
onTouchEnd(e) {
270
+ // 只有真正拖拽滑动过才走触摸定位,纯点击由 onClick 处理,避免双重触发导致抽搐
271
+ if (this.touchMoved) {
272
273
+ this.onAnchorTouch(e);
274
+ }
275
- this.onAnchorTouch(e);
276
277
278
onAnchorTouch: throttle(function (e) {
0 commit comments