云
6 小时以前 5d321660a2f1a4b8756f816283e96481a8c934e4
src/packages/effects/common-ui/src/components/captcha/verification/verify-slide.vue
@@ -108,7 +108,8 @@
  window.removeEventListener('touchend', end);
  window.removeEventListener('mouseup', end);
  window.addEventListener('touchmove', move);
  // passive: false 以便拖动滑块时阻止页面滚动
  window.addEventListener('touchmove', move, { passive: false });
  window.addEventListener('mousemove', move);
  // 鼠标松开
@@ -144,6 +145,8 @@
// 鼠标移动
function move(e: MouseEvent | TouchEvent) {
  if (status.value && isEnd.value === false) {
    // 移动端拖动时阻止页面跟随滚动
    if (e.cancelable) e.preventDefault();
    const x =
      ((e as TouchEvent).touches
        ? (e as TouchEvent).touches[0]?.pageX