feat(App): 添加 naive-ui 主题覆盖配置
This commit is contained in:
14
src/App.vue
14
src/App.vue
@@ -1,14 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { RouterView } from 'vue-router';
|
||||
import { darkTheme } from 'naive-ui';
|
||||
import { darkTheme, type GlobalThemeOverrides } from 'naive-ui';
|
||||
const appStore = useAppStore();
|
||||
|
||||
// https://www.naiveui.com/zh-CN/light/docs/customize-theme
|
||||
const themeOverrides: GlobalThemeOverrides = {
|
||||
common: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DynamicDialog />
|
||||
<ConfirmDialog />
|
||||
<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 />
|
||||
</n-config-provider>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user