refactor: 优化反馈和布局

This commit is contained in:
Ray.Hao
2025-07-21 09:09:24 +08:00
parent 07e9ce725c
commit 030e19084f
15 changed files with 417 additions and 775 deletions

View File

@@ -2,6 +2,21 @@
import { useTheme } from "@/composables/useTheme";
const { theme, themeVars } = useTheme();
// 状态栏高度
const statusBarHeight = ref(0);
// 获取状态栏高度
onMounted(() => {
uni.getSystemInfo({
success: (res) => {
statusBarHeight.value = res.statusBarHeight || 20;
},
fail: () => {
statusBarHeight.value = 20;
},
});
});
</script>
<script lang="ts">
@@ -21,7 +36,9 @@ export default {
custom-style="background-color: #f5f5f5;min-height: 100vh"
:class="{ 'wot-theme-dark': theme === 'dark' }"
>
<slot />
<view class="box-border w-full min-h-screen" :style="{ paddingTop: statusBarHeight + 'px' }">
<slot />
</view>
<wd-notify />
<wd-toast />
<wd-message-box />