From e44afe415778ead16f9e963c365c15faf2cc15fc Mon Sep 17 00:00:00 2001 From: Eiinu Date: Fri, 15 Mar 2024 10:51:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(range):=20touchmove=20=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E4=B8=AD=20rect=20=E8=8E=B7=E5=8F=96=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E6=97=B6=E7=BB=88=E6=AD=A2=20(#2029)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/range/range.taro.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/packages/range/range.taro.tsx b/src/packages/range/range.taro.tsx index ca043c3a98..b8a2f94775 100644 --- a/src/packages/range/range.taro.tsx +++ b/src/packages/range/range.taro.tsx @@ -293,6 +293,7 @@ export const Range: FunctionComponent< setDragStatus('draging') const rect = await getRectByTaro(root.current) + if (!rect) return let delta = touch.deltaX.current let total = rect.width let diff = (delta / total) * scope()