diff --git a/package.json b/package.json index 6764833c..b25c347e 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "@vueuse/core": "12.0.0", "clipboard": "2.0.11", "dayjs": "1.11.13", + "defu": "6.1.4", "echarts": "5.5.1", "json5": "2.2.3", "naive-ui": "2.40.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2db0ea19..8f9c46c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ importers: dayjs: specifier: 1.11.13 version: 1.11.13 + defu: + specifier: ^6.1.4 + version: 6.1.4 echarts: specifier: 5.5.1 version: 5.5.1 diff --git a/src/App.vue b/src/App.vue index cd1b555a..e617af50 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,7 +25,7 @@ const naiveDateLocale = computed(() => { const watermarkProps = computed(() => { return { - content: themeStore.watermark?.text || 'SoybeanAdmin', + content: themeStore.watermark.text, cross: true, fullscreen: true, fontSize: 16, @@ -50,7 +50,7 @@ const watermarkProps = computed(() => { > - + diff --git a/src/layouts/modules/theme-drawer/modules/page-fun.vue b/src/layouts/modules/theme-drawer/modules/page-fun.vue index 24a32fa5..bfa884fd 100644 --- a/src/layouts/modules/theme-drawer/modules/page-fun.vue +++ b/src/layouts/modules/theme-drawer/modules/page-fun.vue @@ -114,10 +114,10 @@ const isWrapperScrollMode = computed(() => themeStore.layout.scrollMode === 'wra > - + - + = { - resetCacheStrategy: 'close', - watermark: { - visible: false, - text: 'SoybeanAdmin' - } -}; +export const overrideThemeSettings: Partial = {}; diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index 0a560812..ac4ca19b 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -21,7 +21,7 @@ declare namespace App { /** Whether info color is followed by the primary color */ isInfoFollowPrimary: boolean; /** Reset cache strategy */ - resetCacheStrategy?: UnionKey.ResetCacheStrategy; + resetCacheStrategy: UnionKey.ResetCacheStrategy; /** Layout */ layout: { /** Layout mode */ @@ -33,7 +33,7 @@ declare namespace App { * * if true, the vertical child level menus in left and horizontal first level menus in top */ - reverseHorizontalMix?: boolean; + reverseHorizontalMix: boolean; }; /** Page */ page: { @@ -98,7 +98,7 @@ declare namespace App { right: boolean; }; /** Watermark */ - watermark?: { + watermark: { /** Whether to show the watermark */ visible: boolean; /** Watermark text */