From 1ebfca73ab87838fea90c3e8d750b2c4a7737bc7 Mon Sep 17 00:00:00 2001 From: zhangjiming Date: Mon, 24 Mar 2025 21:08:25 +0800 Subject: [PATCH] =?UTF-8?q?Tab=E8=B7=B3=E8=BD=AC=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0replace=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 2 +- src/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 82f0720..dc4a854 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -16,7 +16,7 @@ const BottomBar = () => { const location = useLocation(); const { pathname } = location; const setRouteActive = (value: string) => { - navigate(value); + navigate(value, { replace: true }); }; const tabs = [ diff --git a/src/index.tsx b/src/index.tsx index 0057310..5742cd5 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -20,9 +20,9 @@ import MeasureRecord from './pages/MeasureRecord'; const router = createHashRouter( createRoutesFromElements( - } /> + } /> }> - }> + } > }> }> }>