diff --git a/src/app/[[...lang]]/components/form.tsx b/src/app/[[...lang]]/components/form.tsx index b292f84..bdaa395 100644 --- a/src/app/[[...lang]]/components/form.tsx +++ b/src/app/[[...lang]]/components/form.tsx @@ -26,9 +26,8 @@ export default function Form() { >
提交
diff --git a/src/app/components/header.tsx b/src/app/components/header.tsx index 370f768..8a3d83b 100644 --- a/src/app/components/header.tsx +++ b/src/app/components/header.tsx @@ -18,11 +18,13 @@ export default function Header(props: { dict: Record, lang: stri const [hash, setHash] = useState('#home') useEffect(() => { const designWidth = 1440; - const deviceWidth = window.innerWidth; + const deviceWidth = document.documentElement.clientWidth let scale = 1 + console.log('designWidth', deviceWidth) if (deviceWidth <= 1440) { scale = deviceWidth / designWidth; } + console.log('scale', scale) document.documentElement.style.fontSize = `${scale * 14.4}px`; switch (hash) { case '#home': @@ -127,7 +129,7 @@ export default function Header(props: { dict: Record, lang: stri
setShow(false)}> -
{dict?.lang1}