Files
FastapiAdmin/fastapp/src/layouts/default.vue
T
zhangtao 01387a53b4 feat: 重构主题管理并优化UI样式
重构主题管理逻辑,将useTheme composable迁移至pinia store中管理
更新页面布局和样式,调整边距和卡片样式
添加新的主题配置文件并移除旧的主题图片资源
优化登录页和设置页的UI交互
更新unocss配置添加更多flex快捷类
2025-08-28 01:14:29 +08:00

46 lines
890 B
Vue

<script lang="ts" setup>
import { onLoad } from "@dcloudio/uni-app";
import { useThemeStore } from "@/store/modules/theme.store";
const useTheme = useThemeStore();
let theme = useTheme.theme;
let themeVars = useTheme.themeVars;
onLoad(() => {
theme = useTheme.theme;
themeVars = useTheme.themeVars;
});
</script>
<script lang="ts">
export default {
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared",
},
};
</script>
<template>
<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>
.page-wraper {
box-sizing: border-box;
min-height: calc(100vh - var(--window-top));
background: #f9f9f9;
}
.wot-theme-dark.page-wraper {
background: #222;
}
</style>