From aa815849b1e46137f452f07c5a9a4a2be80ad9ef Mon Sep 17 00:00:00 2001 From: kron Date: Thu, 7 Aug 2025 10:48:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=B6=E5=9B=8A=E9=AB=98=E5=BA=A6=E9=80=82?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Container.vue | 12 ++++++------ src/components/Header.vue | 11 +++++------ src/components/UserHeader.vue | 1 + src/pages/index.vue | 5 +---- src/pages/rank-list.vue | 25 +++++++++++++++---------- 5 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/components/Container.vue b/src/components/Container.vue index 37836f1..8f42d9d 100644 --- a/src/components/Container.vue +++ b/src/components/Container.vue @@ -7,7 +7,7 @@ import ScreenHint from "@/components/ScreenHint.vue"; import BackToGame from "@/components/BackToGame.vue"; import { getCurrentGameAPI } from "@/apis"; import { debounce } from "@/util"; -defineProps({ +const props = defineProps({ title: { type: String, default: "", @@ -41,9 +41,9 @@ defineProps({ default: true, }, }); -const isIos = ref(true); const showHint = ref(false); const hintType = ref(0); +const capsuleHeight = ref(0); const showGlobalHint = (type) => { hintType.value = type; showHint.value = true; @@ -52,8 +52,8 @@ const hideGlobalHint = () => { showHint.value = false; }; onMounted(() => { - const deviceInfo = uni.getDeviceInfo(); - isIos.value = deviceInfo.osName === "ios"; + const menuBtnInfo = uni.getMenuButtonBoundingClientRect(); + capsuleHeight.value = menuBtnInfo.top - 9; }); onUnmounted(() => { // const pages = getCurrentPages(); @@ -74,7 +74,7 @@ const goBack = () => {