1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-12-28 12:10:20 +08:00

wip: 主题设置

This commit is contained in:
zclzone
2023-12-13 23:18:54 +08:00
parent c8616ebbf3
commit 4f0fbf6107
37 changed files with 1141 additions and 52 deletions

View File

@@ -9,7 +9,6 @@
import * as NaiveUI from 'naive-ui'
import { isNullOrUndef } from '@/utils'
import settings from '@/settings'
import { useAppStore } from '@/store/modules/app'
export function setupMessage(NMessage) {
@@ -104,10 +103,9 @@ export function setupDialog(NDialog) {
export function setupNaiveDiscreteApi() {
const appStore = useAppStore()
const { naiveThemeOverrides: themeOverrides } = settings
const configProviderProps = computed(() => ({
theme: appStore.isDark ? NaiveUI.darkTheme : undefined,
themeOverrides,
themeOverrides: useAppStore().naiveThemeOverrides,
}))
const { message, dialog, notification, loadingBar } = NaiveUI.createDiscreteApi(
['message', 'dialog', 'notification', 'loadingBar'],