diff --git a/src/components/Header.vue b/src/components/Header.vue index e285c7c..81ea9fc 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -582,6 +582,11 @@ async function onClickWallpaper(url: string) { async function onWallpaperSelect(item: any) { await UserSettingApi.deleteWallById(item.id); await getUserWallpaperList(); + // 删除的是当前生效壁纸时重拉用户设置(后端兜底接管),桌面即时回落不白板 + if (store.getCurWallPaperUrl === item.url) { + const userSetting = await UserSettingApi.getUserSettings(); + if (userSetting) store.setCurUserSettingsInfo(userSetting); + } } async function loadLogoList() { diff --git a/src/views/Settings.vue b/src/views/Settings.vue index 8e2976c..42207d6 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -1187,6 +1187,11 @@ async function onDeleteMyWallpaper(w: any) { async onOk() { await UserSettingApi.deleteWallById(w.id); await loadMyWallpaperList(); + // 删除的是当前生效壁纸时重拉用户设置(后端兜底接管),桌面即时回落不白板 + if (store.getCurWallPaperUrl === w.url) { + const userSetting = await UserSettingApi.getUserSettings(); + if (userSetting) store.setCurUserSettingsInfo(userSetting); + } }, }); }