This commit is contained in:
dap
2024-10-07 10:31:01 +08:00
28 changed files with 151 additions and 134 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();
});