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 (
diff --git a/src/routers/video/masonry.tsx b/src/routers/video/masonry.tsx index 59fc4f1..f581ab0 100644 --- a/src/routers/video/masonry.tsx +++ b/src/routers/video/masonry.tsx @@ -153,7 +153,7 @@ export const NormalVideoRes: FC<{ }> = ({ loading, isEmpty, data }) => { return (