refactor: adjust layout refresh button and watermark; allow static i18n on language switch (#4579)

* refactor: adjust layout refresh button and watermark; allow static i18n on language switch

* chore: typo
This commit is contained in:
Vben
2024-10-06 17:27:32 +08:00
committed by GitHub
parent 324cdd8259
commit 60c615ce8a
25 changed files with 142 additions and 125 deletions

View File

@@ -1,8 +1,6 @@
import type { Watermark, WatermarkOptions } from 'watermark-js-plus';
import { nextTick, onUnmounted, ref, watch } from 'vue';
import { preferences } from '@vben/preferences';
import { nextTick, onUnmounted, ref } from 'vue';
const watermark = ref<Watermark>();
const cachedOptions = ref<Partial<WatermarkOptions>>({
@@ -67,15 +65,6 @@ export function useWatermark() {
watermark.value?.destroy();
}
watch(
() => preferences.app.watermark,
(enable) => {
if (!enable) {
destroyWatermark();
}
},
);
onUnmounted(() => {
destroyWatermark();
});