wip: 临时提交

This commit is contained in:
Ray.Hao committed 2025-07-22 23:21:44 +08:00
1 parent 030e19084f
commit 088ff87ea3
11 files changed
+501 -1275

No files matched your search

+13 -27
View File
@@ -1,22 +1,5 @@
<script lang="ts" setup>
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">
@@ -30,19 +13,22 @@ export default {
</script>
<template>
<wd-config-provider
:theme="theme"
:theme-vars="themeVars"
custom-style="background-color: #f5f5f5;min-height: 100vh"
:class="{ 'wot-theme-dark': theme === 'dark' }"
>
<view class="box-border w-full min-h-screen" :style="{ paddingTop: statusBarHeight + 'px' }">
<slot />
</view>
<wd-config-provider :theme-vars="themeVars" :theme="theme" :custom-class="`page-wraper ${theme}`">
<slot />
<wd-notify />
<wd-toast />
<wd-message-box />
</wd-config-provider>
</template>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.page-wraper {
box-sizing: border-box;
min-height: calc(100vh - var(--window-top));
background: #f9f9f9;
}
.wot-theme-dark.page-wraper {
background: #222;
}
</style>