diff --git a/packages/taro-components-react/src/components/image/index.tsx b/packages/taro-components-react/src/components/image/index.tsx index 1282bd30aaf3..3cd7c38bbcc8 100644 --- a/packages/taro-components-react/src/components/image/index.tsx +++ b/packages/taro-components-react/src/components/image/index.tsx @@ -18,7 +18,7 @@ interface IProps extends React.HTMLAttributes { function Image (props: IProps) { const imgRef = useRef(null) const observer = useRef>({}) - const [_, setIsLoaded] = useState(false) + const [, setIsLoaded] = useState(false) const { className, style = {}, diff --git a/packages/taro-components-rn/src/components/hooks/useClickable.tsx b/packages/taro-components-rn/src/components/hooks/useClickable.tsx index 634b25554d82..087685648eee 100644 --- a/packages/taro-components-rn/src/components/hooks/useClickable.tsx +++ b/packages/taro-components-rn/src/components/hooks/useClickable.tsx @@ -158,11 +158,11 @@ const useClickable = (props: any) => { if (!hasMove) { // @ts-ignore if (Platform.OS === 'harmony') { - let ms = Math.floor(gapTime / 1000); - if (ms > 0) { // 这种情况是 1000毫秒以上 || 单位小于毫秒的情况 - let us = Math.floor(ms / 1000); - if (us > 0 || ms > 10) { // 防止以后系统升级改成毫秒后的容错处理 - gapTime = ms; + const ms = Math.floor(gapTime / 1000) + if (ms > 0) { // 这种情况是 1000毫秒以上 || 单位小于毫秒的情况 + const us = Math.floor(ms / 1000) + if (us > 0 || ms > 10) { // 防止以后系统升级改成毫秒后的容错处理 + gapTime = ms } } }