diff --git a/src/routers/online/index.tsx b/src/routers/online/index.tsx index 5ef81bf..535cbd4 100644 --- a/src/routers/online/index.tsx +++ b/src/routers/online/index.tsx @@ -1,12 +1,17 @@ /** * */ -import { useSetEuFetchParamas } from "@store/euWhatLook"; +import { useGetEuFetchParmas, useSetEuFetchParamas } from "@store/euWhatLook"; import Content from "./content"; import { useEffect } from "react"; export default function Index() { const handerSetEuParmas = useSetEuFetchParamas(); useEffect(handerSetEuParmas.bind(null, "online"), []); + const effectDeps = useGetEuFetchParmas(); + useEffect(() => { + //在滚动的过程切换参数应该自动滚动到顶端防止一次性加载完成 + window.scrollTo({ top: 0 }); + }, [effectDeps]); return (