mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 20:55:14 +00:00
重构主题管理逻辑,将useTheme composable迁移至pinia store中管理 更新页面布局和样式,调整边距和卡片样式 添加新的主题配置文件并移除旧的主题图片资源 优化登录页和设置页的UI交互 更新unocss配置添加更多flex快捷类
46 lines
890 B
Vue
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>
|