mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-10-16 14:43:43 +08:00
feat(projects): 集成naiveUI主题配置,将css vars添加至html
This commit is contained in:
17
src/App.vue
17
src/App.vue
@@ -1,6 +1,19 @@
|
||||
<template>
|
||||
<router-view />
|
||||
<n-config-provider :theme-overrides="theme.naiveThemeOverrides">
|
||||
<router-view />
|
||||
</n-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
<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();
|
||||
});
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
Reference in New Issue
Block a user