Files
vue-ts-example-2025/src/App.vue
严浩 aadf03edd0
Some checks failed
CI/CD Pipeline / playwright (push) Failing after 8m43s
CI/CD Pipeline / build-and-deploy (push) Has been skipped
chore: lint
2025-10-27 02:01:08 +08:00

27 lines
580 B
Vue

<script setup lang="ts">
import type { GlobalThemeOverrides } from 'naive-ui';
import { darkTheme } from 'naive-ui';
import { RouterView } from 'vue-router';
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
:theme-overrides
preflight-style-disabled
:theme="appStore.isDark ? darkTheme : null"
abstract
>
<RouterView />
</n-config-provider>
</template>