From 545f77ef9d92984a80e33415a917c3109a36ef6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=91=9E?= Date: Sat, 13 Sep 2025 19:02:07 +0800 Subject: [PATCH] fix --- src/components/CustomNavbar/index.module.scss | 2 + src/container/listContainer/index.scss | 1 - src/container/listCustomNavbar/index.scss | 10 ++-- src/container/listCustomNavbar/index.tsx | 11 +++- src/game_pages/list/index.tsx | 50 +++++++++++++++---- 5 files changed, 55 insertions(+), 19 deletions(-) diff --git a/src/components/CustomNavbar/index.module.scss b/src/components/CustomNavbar/index.module.scss index b15b2d5..d6eaab3 100644 --- a/src/components/CustomNavbar/index.module.scss +++ b/src/components/CustomNavbar/index.module.scss @@ -3,4 +3,6 @@ top: 0; z-index: 999; background-color: #ffffff; + overflow: hidden; + z-index: 999; } \ No newline at end of file diff --git a/src/container/listContainer/index.scss b/src/container/listContainer/index.scss index 7d2ded3..0a02465 100644 --- a/src/container/listContainer/index.scss +++ b/src/container/listContainer/index.scss @@ -21,7 +21,6 @@ } .bottomTextWrapper { - width: 100%; height: 68px; padding: 0 16px; display: flex; diff --git a/src/container/listCustomNavbar/index.scss b/src/container/listCustomNavbar/index.scss index 8f37ff2..41524a0 100644 --- a/src/container/listCustomNavbar/index.scss +++ b/src/container/listCustomNavbar/index.scss @@ -118,9 +118,9 @@ backface-visibility: hidden; -webkit-backface-visibility: hidden; - /* 优化过渡动画,使用更快的缓动函数 */ - transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), - transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); + /* 优化过渡动画,使用更平滑的缓动函数和更短的动画时间 */ + transition: opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), + transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); } /* 第一个元素样式 */ @@ -131,13 +131,13 @@ .secondElement { /* 初始状态:透明且稍微偏移 */ opacity: 0; - transform: translateY(10px); + transform: translateY(5px); } /* 隐藏状态 */ .hidden { opacity: 0; - transform: translateY(10px); + transform: translateY(5px); } /* 可见状态 */ diff --git a/src/container/listCustomNavbar/index.tsx b/src/container/listCustomNavbar/index.tsx index 11fc502..9448770 100644 --- a/src/container/listCustomNavbar/index.tsx +++ b/src/container/listCustomNavbar/index.tsx @@ -7,6 +7,7 @@ import CustomNavbar from "@/components/CustomNavbar"; import { Input } from "@nutui/nutui-react-taro"; import Taro from "@tarojs/taro"; import "./index.scss"; +import { useMemo } from "react"; interface IProps { config?: { @@ -70,12 +71,18 @@ const ListHeader = (props: IProps) => { paddingTop: `4px`, }; + const showInputNavBar = useMemo(() => { + return isShowInputCustomerNavBar || showInput; + }, [isShowInputCustomerNavBar, showInput]); + + console.log("===showInputNavBar",showInputNavBar) + return ( {/* 首页logo 导航*/} {/* 搜索导航 */}