From 1e8720eac19f9197d44e51820fbfc1bb8dee44cd Mon Sep 17 00:00:00 2001 From: Haiyi <1021441632@qq.com> Date: Wed, 30 Nov 2022 10:31:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=E4=BF=AE=E6=94=B9=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E4=BA=A7=E7=94=9F=E5=A4=9A=E4=BD=99=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/sideBar/index.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/components/sideBar/index.tsx b/src/components/sideBar/index.tsx index ef763a4..a17cb66 100644 --- a/src/components/sideBar/index.tsx +++ b/src/components/sideBar/index.tsx @@ -82,21 +82,6 @@ const SideBar = ({ computeSelectTab(index) } - useEffect(() => { - Taro.nextTick(() => { - const query = Taro.createSelectorQuery() - query.select('.side_bar_select').boundingClientRect((rect) => { - console.log('rect::', rect) - const clientHeight = rect.height - const clientWidth = rect.width - const ratio = 750 / clientWidth - const height = clientHeight * ratio - num_half.current = Math.ceil(height / 2 / heightItem) - init() - }).exec() - }) - }) - const [currentIndex, setcurrentIndex] = useState(0) useMemo(() => { Taro.nextTick(() => {