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({}) }) })() }, [])