From 3a7a330043b6b8e27b6774b75c423968a0423b95 Mon Sep 17 00:00:00 2001 From: Aresn Date: Fri, 31 May 2024 11:58:44 +0800 Subject: [PATCH] Update Thread.vue --- components/i/library/Thread.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/i/library/Thread.vue b/components/i/library/Thread.vue index eace86d..388a970 100644 --- a/components/i/library/Thread.vue +++ b/components/i/library/Thread.vue @@ -76,9 +76,12 @@ function handleOpenSelect () { } function handleUpdateCollect (data) { const { c_id } = data.value - if (c_id === thread.value.c_id) thread.value.collections = [data.value] + if (c_id === thread.value.c_id) { + thread.value.collections = [data.value] + Layout.clearCollectData() + } } watch(()=> Layout.selectCollectData, (data) => { - handleUpdateCollect(data) + if (data.value !== null) handleUpdateCollect(data) }, { deep: true }) \ No newline at end of file -- GitLab