feat(App): 添加 naive-ui 主题覆盖配置
All checks were successful
CI/CD Pipeline / playwright (push) Successful in 2m7s
CI/CD Pipeline / build-and-deploy (push) Successful in 4m23s

This commit is contained in:
严浩
2025-10-23 18:25:22 +08:00
parent 93ecda7617
commit 29d3000b50

View File

@@ -1,14 +1,24 @@
<script setup lang="ts"> <script setup lang="ts">
import { RouterView } from 'vue-router'; import { RouterView } from 'vue-router';
import { darkTheme } from 'naive-ui'; import { darkTheme, type GlobalThemeOverrides } from 'naive-ui';
const appStore = useAppStore(); const appStore = useAppStore();
// https://www.naiveui.com/zh-CN/light/docs/customize-theme
const themeOverrides: GlobalThemeOverrides = {
common: {},
};
</script> </script>
<template> <template>
<DynamicDialog /> <DynamicDialog />
<ConfirmDialog /> <ConfirmDialog />
<Toast /> <Toast />
<n-config-provider preflight-style-disabled :theme="appStore.isDark ? darkTheme : null" abstract> <n-config-provider
:theme-overrides
preflight-style-disabled
:theme="appStore.isDark ? darkTheme : null"
abstract
>
<RouterView /> <RouterView />
</n-config-provider> </n-config-provider>
</template> </template>