From 949bb9149b4d42ef388856e68815adc2e869df7a Mon Sep 17 00:00:00 2001 From: xuan Date: Fri, 18 Nov 2022 17:33:04 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(ID1000733):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=BA=95=E9=83=A8=E6=A0=8F=E6=8C=89=E9=92=AE=E4=B8=8D?= =?UTF-8?q?=E8=A7=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/shopping/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/shopping/index.tsx b/src/pages/shopping/index.tsx index ef3545c..084f757 100644 --- a/src/pages/shopping/index.tsx +++ b/src/pages/shopping/index.tsx @@ -60,6 +60,8 @@ const ShoppingCartContainer: FC = () => { } const listHeightRef = useRef('auto') + // 强制刷新 + const [, setForceUpdate] = useState({}) const { fetchData, state } = ShoppingCartListApi() @@ -137,6 +139,8 @@ const ShoppingCartContainer: FC = () => { const bottomBarHeight = res[2].height const listHeight = containerHeight - topBarHeight - bottomBarHeight listHeightRef.current = listHeight + 'px' + // 强制刷新 + setForceUpdate({}) }) })() }, [])