From 9b68fa58a52189908031faed5587d81ae882fb03 Mon Sep 17 00:00:00 2001 From: fangxiang Date: Fri, 22 Apr 2022 09:54:14 +0800 Subject: [PATCH] =?UTF-8?q?pad=E4=BF=A1=E5=8F=B7=E6=BA=90=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=BF=87=E6=BB=A4=E6=8E=89=E9=9A=90=E8=97=8F=E4=BF=A1?= =?UTF-8?q?=E5=8F=B7=E6=BA=90=E3=80=82=E6=B7=BB=E5=8A=A0=E6=B8=85=E5=B1=8F?= =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pad/BottomBar.vue | 5 ++++- src/pad/ContentWall.vue | 12 +++++++++--- src/pages/WallPage.vue | 12 +++++++++--- src/store/index.ts | 3 +++ 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/pad/BottomBar.vue b/src/pad/BottomBar.vue index 9240c3e..8f3320c 100644 --- a/src/pad/BottomBar.vue +++ b/src/pad/BottomBar.vue @@ -267,7 +267,10 @@ export default defineComponent({ const $t = useI18n(); const signal_sources = computed({ - get: () => $store.state.signal_sources, + get: () => + $store.state.signal_sources.filter( + (element) => element && !element.local_file_flag + ), set: (val) => null, }); diff --git a/src/pad/ContentWall.vue b/src/pad/ContentWall.vue index 277bb2f..0b6fc8a 100644 --- a/src/pad/ContentWall.vue +++ b/src/pad/ContentWall.vue @@ -277,9 +277,15 @@ export default defineComponent({ { const temp = JSON.parse(notify.data); if (temp && temp.window_id) { - $store.commit("removeWindow", { - window_id: temp.window_id, - }); + if (temp.window_id << 0 == -1) { + $store.commit("cleanWindows", { + window_id: temp.window_id, + }); + } else { + $store.commit("removeWindow", { + window_id: temp.window_id, + }); + } } } break; diff --git a/src/pages/WallPage.vue b/src/pages/WallPage.vue index 88c677b..735432c 100644 --- a/src/pages/WallPage.vue +++ b/src/pages/WallPage.vue @@ -413,9 +413,15 @@ export default defineComponent({ { const temp = JSON.parse(notify.data); if (temp && temp.window_id) { - $store.commit("removeWindow", { - window_id: temp.window_id, - }); + if (temp.window_id << 0 == -1) { + $store.commit("cleanWindows", { + window_id: temp.window_id, + }); + } else { + $store.commit("removeWindow", { + window_id: temp.window_id, + }); + } } } break; diff --git a/src/store/index.ts b/src/store/index.ts index a41f7e4..2f44fef 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -449,6 +449,9 @@ export default store(function (/* { ssrContext } */) { console.log("window_id???"); } }, + cleanWindows(state: StateInterface, playload?: any) { + state.windows.splice(0, state.windows.length); + }, editWindow(state: StateInterface, playload?: any) { const uuid = playload.uuid; const new_window = playload.new_window as WindowOpenNotifyEntity;