mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 19:29:04 +08:00
fix: missing await for an async function call (#4035)
This commit is contained in:
@@ -48,18 +48,18 @@ export function useWatermark() {
|
||||
};
|
||||
watermark.value = new Watermark(cachedOptions.value);
|
||||
|
||||
watermark.value?.create();
|
||||
await watermark.value?.create();
|
||||
}
|
||||
|
||||
async function updateWatermark(options: Partial<WatermarkOptions>) {
|
||||
if (!watermark.value || !watermark.value?.check()) {
|
||||
await initWatermark(options);
|
||||
} else {
|
||||
if (watermark.value) {
|
||||
await nextTick();
|
||||
watermark.value?.changeOptions({
|
||||
await watermark.value?.changeOptions({
|
||||
...cachedOptions.value,
|
||||
...options,
|
||||
});
|
||||
} else {
|
||||
await initWatermark(options);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user