From e6d0048cad8e2beb28caf93961c75174c341e750 Mon Sep 17 00:00:00 2001 From: master1lan <278457198@qq.com> Date: Tue, 28 Feb 2023 13:59:58 +0800 Subject: [PATCH] =?UTF-8?q?:lipstick:=20style(custom):=20=E9=A1=B6?= =?UTF-8?q?=E9=83=A8=E5=9B=BA=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routers/layout/header.tsx | 2 +- src/routers/layout/search/pc/pc.module.less | 1 + src/routers/video/masonry.tsx | 60 +++++++++++---------- 3 files changed, 35 insertions(+), 28 deletions(-) diff --git a/src/routers/layout/header.tsx b/src/routers/layout/header.tsx index 4830508..358f891 100644 --- a/src/routers/layout/header.tsx +++ b/src/routers/layout/header.tsx @@ -22,7 +22,7 @@ export default function Header() { const ReactiveHeader = memo(() => { return ( -
+
{/* 手机端 */}
diff --git a/src/routers/layout/search/pc/pc.module.less b/src/routers/layout/search/pc/pc.module.less index ad30747..f07eef7 100644 --- a/src/routers/layout/search/pc/pc.module.less +++ b/src/routers/layout/search/pc/pc.module.less @@ -30,6 +30,7 @@ overflow: hidden; text-overflow: ellipsis; max-width: 75px; + white-space: nowrap; } span+input { diff --git a/src/routers/video/masonry.tsx b/src/routers/video/masonry.tsx index b4166e2..9743efa 100644 --- a/src/routers/video/masonry.tsx +++ b/src/routers/video/masonry.tsx @@ -125,33 +125,39 @@ export const NormalVideoRes: FC<{ loading: boolean; isEmpty: boolean; data: VideoListType; -}> = ({ loading, isEmpty, data }) => ( - - {loading ? ( - - ) : isEmpty ? ( - - ) : ( - data.map((item) => ) - )} - -); - +}> = ({ loading, isEmpty, data }) => { + useEffect(() => { + if (loading) { + window.scrollTo({ top: 0 }); + } + }, [loading]); + return ( + + {loading ? ( + + ) : isEmpty ? ( + + ) : ( + data.map((item) => ) + )} + + ); +}; const EmptyItem = () => (
暂无数据
);