mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-10-12 04:43:42 +08:00
feat(projects): 初始化加载效果:应用主题颜色
This commit is contained in:
15
src/App.vue
15
src/App.vue
@@ -1,19 +1,10 @@
|
||||
<template>
|
||||
<n-config-provider :theme-overrides="theme.naiveThemeOverrides">
|
||||
<app-provider>
|
||||
<router-view />
|
||||
</n-config-provider>
|
||||
</app-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue';
|
||||
import { NConfigProvider } from 'naive-ui';
|
||||
import { useThemeStore } from '@/store';
|
||||
|
||||
const theme = useThemeStore();
|
||||
const { addThemeCssVarsToRoot } = useThemeStore();
|
||||
|
||||
onMounted(() => {
|
||||
addThemeCssVarsToRoot();
|
||||
});
|
||||
import AppProvider from './AppProvider.vue';
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
Reference in New Issue
Block a user