diff --git a/components/Switch.tsx b/components/Switch.tsx index fa025a3..f819512 100644 --- a/components/Switch.tsx +++ b/components/Switch.tsx @@ -62,7 +62,7 @@ export default function Switch({ w: currentTagElement.offsetWidth, }) } - }, [nowTag, allTag]) + }, [nowTag]) // 处理选中标签的自动滚动 useEffect(() => { @@ -82,7 +82,7 @@ export default function Switch({ behavior: 'smooth' }) } - }, [nowTag, allTag]) + }, [nowTag]) return (