This commit is contained in:
kron
2025-08-07 11:04:12 +08:00
parent aa815849b1
commit b180d89ab2
6 changed files with 18 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
<script setup>
import { ref } from "vue";
import { ref, onMounted } from "vue";
const props = defineProps({
type: {
type: Number,
@@ -10,6 +10,11 @@ const props = defineProps({
default: "#050b19",
},
});
const capsuleHeight = ref(0);
onMounted(() => {
const menuBtnInfo = uni.getMenuButtonBoundingClientRect();
capsuleHeight.value = menuBtnInfo.top + 50 - 9;
});
</script>
<template>
@@ -30,7 +35,7 @@ const props = defineProps({
class="bg-image"
v-if="type === 2"
src="../static/app-bg3.png"
mode="widthFix"
:style="{ height: capsuleHeight + 'px' }"
/>
<view class="bg-overlay" v-if="type === 0"></view>
</view>