diff --git a/src/App.vue b/src/App.vue
index 22353307..35f65f69 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -21,6 +21,22 @@ const naiveLocale = computed(() => {
const naiveDateLocale = computed(() => {
return naiveDateLocales[appStore.locale];
});
+
+const watermarkProps = computed(() => {
+ return {
+ content: themeStore.watermark.text,
+ cross: true,
+ fullscreen: true,
+ fontSize: 16,
+ lineHeight: 16,
+ width: 384,
+ height: 384,
+ xOffset: 12,
+ yOffset: 60,
+ rotate: -15,
+ zIndex: 9999
+ };
+});
@@ -33,6 +49,7 @@ const naiveDateLocale = computed(() => {
>
+
diff --git a/src/layouts/modules/theme-drawer/modules/page-fun.vue b/src/layouts/modules/theme-drawer/modules/page-fun.vue
index 8f80994f..4595c8a5 100644
--- a/src/layouts/modules/theme-drawer/modules/page-fun.vue
+++ b/src/layouts/modules/theme-drawer/modules/page-fun.vue
@@ -101,6 +101,19 @@ const isWrapperScrollMode = computed(() => themeStore.layout.scrollMode === 'wra
>
+
+
+
+
+
+
diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts
index 26441217..8b331859 100644
--- a/src/locales/langs/en-us.ts
+++ b/src/locales/langs/en-us.ts
@@ -135,6 +135,10 @@ const local: App.I18n.Schema = {
height: 'Footer Height',
right: 'Right Footer'
},
+ watermark: {
+ visible: 'Watermark Full Screen Visible',
+ text: 'Watermark Text'
+ },
themeDrawerTitle: 'Theme Configuration',
pageFunTitle: 'Page Function',
configOperation: {
diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts
index 95f1e665..630b2910 100644
--- a/src/locales/langs/zh-cn.ts
+++ b/src/locales/langs/zh-cn.ts
@@ -135,6 +135,10 @@ const local: App.I18n.Schema = {
height: '底部高度',
right: '底部局右'
},
+ watermark: {
+ visible: '显示全屏水印',
+ text: '水印文本'
+ },
themeDrawerTitle: '主题配置',
pageFunTitle: '页面功能',
configOperation: {
diff --git a/src/theme/settings.ts b/src/theme/settings.ts
index 74c1c885..8fa6098e 100644
--- a/src/theme/settings.ts
+++ b/src/theme/settings.ts
@@ -49,6 +49,10 @@ export const themeSettings: App.Theme.ThemeSetting = {
height: 48,
right: true
},
+ watermark: {
+ visible: false,
+ text: 'SoybeanAdmin'
+ },
tokens: {
light: {
colors: {
diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts
index 728a2c7f..d1a7f599 100644
--- a/src/typings/app.d.ts
+++ b/src/typings/app.d.ts
@@ -95,6 +95,13 @@ declare namespace App {
/** Whether float the footer to the right when the layout is 'horizontal-mix' */
right: boolean;
};
+ /** Watermark */
+ watermark: {
+ /** Whether to show the watermark */
+ visible: boolean;
+ /** Watermark text */
+ text: string;
+ };
/** define some theme settings tokens, will transform to css variables */
tokens: {
light: ThemeSettingToken;
@@ -375,6 +382,10 @@ declare namespace App {
height: string;
right: string;
};
+ watermark: {
+ visible: string;
+ text: string;
+ };
themeDrawerTitle: string;
pageFunTitle: string;
configOperation: {
diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts
index 1067e4db..1b0ebf02 100644
--- a/src/typings/components.d.ts
+++ b/src/typings/components.d.ts
@@ -84,6 +84,7 @@ declare module 'vue' {
NThing: typeof import('naive-ui')['NThing']
NTooltip: typeof import('naive-ui')['NTooltip']
NTree: typeof import('naive-ui')['NTree']
+ NWatermark: typeof import('naive-ui')['NWatermark']
PinToggler: typeof import('./../components/common/pin-toggler.vue')['default']
ReloadButton: typeof import('./../components/common/reload-button.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']