fix(App.vue): 🐛 水印字体颜色未适配暗黑主题导致无法显示问题修复
This commit is contained in:
parent
9335ec1647
commit
68b76b82cf
16
src/App.vue
16
src/App.vue
|
|
@ -3,7 +3,8 @@
|
|||
<!-- 开启水印 -->
|
||||
<el-watermark
|
||||
v-if="watermarkEnabled"
|
||||
:content="watermarkContent"
|
||||
:font="{ color: fontColor }"
|
||||
:content="defaultSettings.watermarkContent"
|
||||
class="wh-full"
|
||||
>
|
||||
<router-view />
|
||||
|
|
@ -16,12 +17,19 @@
|
|||
<script setup lang="ts">
|
||||
import { useAppStore, useSettingsStore } from "@/store";
|
||||
import defaultSettings from "@/settings";
|
||||
import { ThemeEnum } from "@/enums/ThemeEnum";
|
||||
|
||||
const appStore = useAppStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
|
||||
const locale = computed(() => appStore.locale);
|
||||
const size = computed(() => appStore.size);
|
||||
|
||||
const watermarkContent = defaultSettings.watermarkContent;
|
||||
const settingsStore = useSettingsStore();
|
||||
const watermarkEnabled = computed(() => settingsStore.watermarkEnabled);
|
||||
|
||||
// 明亮/暗黑主题水印字体颜色适配
|
||||
const fontColor = computed(() => {
|
||||
return settingsStore.theme === ThemeEnum.DARK
|
||||
? "rgba(255, 255, 255, .15)"
|
||||
: "rgba(0, 0, 0, .15)";
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue