From 068bfaef5d0ba25adad16e179312d2b9f5f4fa74 Mon Sep 17 00:00:00 2001 From: al Date: Wed, 14 Aug 2024 12:37:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/login/index.module.scss | 6 +++--- app/my/relationship/index.module.scss | 6 ++++++ app/my/relationship/page.js | 4 ++-- app/page.js | 2 +- app/space/page.js | 10 +++++++--- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/app/login/index.module.scss b/app/login/index.module.scss index 1262223..5bc1412 100644 --- a/app/login/index.module.scss +++ b/app/login/index.module.scss @@ -1,9 +1,9 @@ .customTabs { border: none; - --active-line-color: #ff8383; - --active-title-color: #fff; - --title-color: #a0a0a0; + --active-line-color: #ff8383!important; + --active-title-color: #fff!important; + --title-color: #a0a0a0!important; --inactive-title-color: #FFFFFF80; --tab-border-color: #ff8383; } diff --git a/app/my/relationship/index.module.scss b/app/my/relationship/index.module.scss index cce9dae..ff36c5d 100644 --- a/app/my/relationship/index.module.scss +++ b/app/my/relationship/index.module.scss @@ -9,6 +9,12 @@ .jumboTabs>div>div:last-child{ grid-template-columns: repeat(2, 1fr); } +.jumboTabs { + &>div:first-child{ + position: sticky; + top: 52px; + } +} .listTimeBox>div,.listTimeBox>div>div{ width: 100%; padding-right: 0; diff --git a/app/my/relationship/page.js b/app/my/relationship/page.js index b0e5020..da346a0 100644 --- a/app/my/relationship/page.js +++ b/app/my/relationship/page.js @@ -106,7 +106,7 @@ export default function Relationship() { }; return (
-
+
关系

{/* 内容 */} -
+
setCurrentKey(key)} activeKey={currentKey} diff --git a/app/page.js b/app/page.js index 36b3def..17b8f75 100644 --- a/app/page.js +++ b/app/page.js @@ -276,7 +276,7 @@ const FollowPostList = forwardRef(({ scrollHeight }, ref) => { } ); // debugger; - console.log("offset", followsResponse.data.offset); + // console.log("offset", followsResponse.data.offset); setOffset(followsResponse.data.offset); setHasMore(followsResponse.data.more); setLoading(false); diff --git a/app/space/page.js b/app/space/page.js index 30d1e97..f1b7ba9 100644 --- a/app/space/page.js +++ b/app/space/page.js @@ -35,7 +35,6 @@ export default function Space() { const [scrollHeight, setScrollHeight] = useState(0); const [offset, setOffset] = useState(0); const [loading, setLoading] = useState(false); - const scrollRef = useRef(null); const router = useRouter(); // 获取屏幕高度 // const scrollHeight = 600; @@ -259,7 +258,7 @@ export default function Space() { {!!activeIndex && ( -
+
{loading && !dataList.length && ( <> @@ -305,7 +304,12 @@ export default function Space() { size="xl" // onClick={firstRequest} onClick={() => { - scrollRef.current?.scrollTo(0, 0); + // scrollRef.current?.scrollTo(0, 0); + window.scrollTo({ + top: 0, + left: 0, + behavior: "smooth", // 可选,平滑滚动效果 + }); firstRequest(); }} />