From edd527fee5f7ee973b7d847a9fb82c39cfb67ee5 Mon Sep 17 00:00:00 2001 From: master1lan <278457198@qq.com> Date: Wed, 1 Mar 2023 10:17:38 +0800 Subject: [PATCH] =?UTF-8?q?:lipstick:=20style(custom):=20=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E7=AB=AF=E6=90=9C=E7=B4=A2=E6=A0=8F=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8Cpc=E7=AB=AF=E9=AB=98=E7=BA=A7?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=BD=93=E6=97=A0=E8=BE=93=E5=85=A5=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=97=B6=E5=B1=95=E7=A4=BA=E9=BB=98=E8=AE=A4=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/vite.master.config.ts | 3 +++ src/routers/layout/header.tsx | 2 +- src/routers/layout/search/pc/search.tsx | 8 ++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config/vite.master.config.ts b/config/vite.master.config.ts index 56938d5..dcac897 100644 --- a/config/vite.master.config.ts +++ b/config/vite.master.config.ts @@ -83,6 +83,8 @@ export default mergeConfig( react: ["react", "react-dom"], "react-router": ["react-router-dom"], "react-redux": ["@reduxjs/toolkit", "react-redux"], + masonic: ["masonic"], + sentry: ["@sentry/react", "@sentry/tracing"], axios: ["axios"], lib: [ "@mui/icons-material", @@ -104,6 +106,7 @@ export default mergeConfig( "react-intersection-observer", "dayjs", ], + "react-photo-view": ["react-photo-view"], }, }, }, diff --git a/src/routers/layout/header.tsx b/src/routers/layout/header.tsx index 358f891..1556dd7 100644 --- a/src/routers/layout/header.tsx +++ b/src/routers/layout/header.tsx @@ -24,7 +24,7 @@ const ReactiveHeader = memo(() => { return (
{/* 手机端 */} -
+
{/* pc端和平板端header部 */} diff --git a/src/routers/layout/search/pc/search.tsx b/src/routers/layout/search/pc/search.tsx index 0367e24..f0f4af8 100644 --- a/src/routers/layout/search/pc/search.tsx +++ b/src/routers/layout/search/pc/search.tsx @@ -119,13 +119,15 @@ const AdvanceSearchItem = forwardRef( (props, ref) => { const { inputRef, handerfocus } = useBackRef(ref); const { focused } = useSearchFocus(); + const inptValue = inputRef.current?.value, + showedTitle = focused ? props.title : inptValue ? inptValue : props.title; return ( <>
- {focused ? props.title : inputRef.current?.value} + {showedTitle} ((props, ref) => { const { inputRef, handerfocus } = useBackRef(ref); const { focused } = useSearchFocus(); + const inptValue = inputRef.current?.value, + showedTitle = focused ? props.title : inptValue ? inptValue : props.title; return ( <>
- {focused ? props.title : inputRef.current?.value} + {showedTitle}