From 2be10fe04473368453aec005bb38f95e56702651 Mon Sep 17 00:00:00 2001 From: lbw Date: Wed, 8 Mar 2023 12:24:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B0=B4=E5=8D=B0=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=85=E5=90=AB=E5=BD=93=E5=89=8D=E7=94=A8=E6=88=B7=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/navBars/breadcrumb/setings.vue | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/layout/navBars/breadcrumb/setings.vue b/src/layout/navBars/breadcrumb/setings.vue index 3993e7e1..8680aeba 100644 --- a/src/layout/navBars/breadcrumb/setings.vue +++ b/src/layout/navBars/breadcrumb/setings.vue @@ -271,13 +271,6 @@ -
-
{{ $t('layout.fourWartermarkText') }}
-
- -
-
- {{ $t('layout.fiveTitle') }}
@@ -432,6 +425,7 @@ import Watermark from '/@/utils/wartermark'; import commonFunction from '/@/utils/commonFunction'; import other from '/@/utils/other'; import mittBus from '/@/utils/mitt'; +import { useUserInfo } from '/@/stores/userInfo'; // 定义变量内容 const { locale } = useI18n(); @@ -555,16 +549,11 @@ const onAddDarkChange = () => { }; // 4、界面显示 --> 开启水印 const onWartermarkChange = () => { - getThemeConfig.value.isWartermark ? Watermark.set(getThemeConfig.value.wartermarkText) : Watermark.del(); - setLocalThemeConfig(); -}; -// 4、界面显示 --> 水印文案 -const onWartermarkTextInput = (val: string) => { - getThemeConfig.value.wartermarkText = verifyAndSpace(val); - if (getThemeConfig.value.wartermarkText === '') return false; - if (getThemeConfig.value.isWartermark) Watermark.set(getThemeConfig.value.wartermarkText); + const username = useUserInfo().userInfos.user.username; + getThemeConfig.value.isWartermark ? Watermark.set(username) : Watermark.del(); setLocalThemeConfig(); }; + // 5、布局切换 const onSetLayout = (layout: string) => { Local.set('oldLayout', layout);