refactor: 优化反馈和布局
This commit is contained in:
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user