|
|
|
@ -2604,12 +2604,29 @@ Page({ |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 阻止事件冒泡
|
|
|
|
// 阻止事件冒泡和默认行为,防止iOS下拉拖动
|
|
|
|
stopPropagation: function (e) { |
|
|
|
// 安全检查,防止TypeError
|
|
|
|
if (e && typeof e.stopPropagation === 'function') { |
|
|
|
if (e) { |
|
|
|
if (typeof e.stopPropagation === 'function') { |
|
|
|
e.stopPropagation(); |
|
|
|
} |
|
|
|
if (typeof e.preventDefault === 'function') { |
|
|
|
e.preventDefault(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// iOS专用的触摸事件处理,防止下拉拖动
|
|
|
|
handleTouchMove: function (e) { |
|
|
|
// 在iOS上,当scrollTop为0时,阻止下拉拖动
|
|
|
|
const scrollTop = e.detail.scrollTop || 0; |
|
|
|
if (scrollTop === 0) { |
|
|
|
// 阻止默认行为,防止iOS弹性滚动
|
|
|
|
if (e && typeof e.preventDefault === 'function') { |
|
|
|
e.preventDefault(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 跳转到货源管理页面
|
|
|
|
|