From 884b62528f9e50f62b61acc6f0fded2f9a92d453 Mon Sep 17 00:00:00 2001 From: eiinu Date: Wed, 6 Dec 2023 18:42:17 +0800 Subject: [PATCH] fix: event --- src/packages/__VUE/range/index.taro.vue | 6 +++--- src/packages/__VUE/range/index.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/packages/__VUE/range/index.taro.vue b/src/packages/__VUE/range/index.taro.vue index b2a0d055f0..221285f667 100644 --- a/src/packages/__VUE/range/index.taro.vue +++ b/src/packages/__VUE/range/index.taro.vue @@ -354,7 +354,7 @@ export default create({ dragStatus.value = 'start'; event.stopPropagation(); - event.preventDefault(); + if (event.cancelable) event.preventDefault(); }; // 初始化 range 宽高 @@ -373,7 +373,7 @@ export default create({ return; } event.stopPropagation(); - event.preventDefault(); + if (event.cancelable) event.preventDefault(); if (dragStatus.value === 'start') { emit('dragStart'); } @@ -406,7 +406,7 @@ export default create({ } dragStatus.value = ''; event.stopPropagation(); - event.preventDefault(); + if (event.cancelable) event.preventDefault(); }; const curValue = (idx?: number): number => { const value = diff --git a/src/packages/__VUE/range/index.vue b/src/packages/__VUE/range/index.vue index 5d560e1575..6b8069fdd4 100644 --- a/src/packages/__VUE/range/index.vue +++ b/src/packages/__VUE/range/index.vue @@ -362,7 +362,7 @@ export default create({ } updateValue(currentValue); event.stopPropagation(); - event.preventDefault(); + if (event.cancelable) event.preventDefault(); }; const onTouchEnd = () => {