From a6bd6dd1b6f00eae2442b6ade6d007de64d0d2b4 Mon Sep 17 00:00:00 2001 From: Aresn Date: Fri, 31 May 2024 11:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0=E5=B7=B2?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/i/library/Select.vue | 6 ++++++ components/i/library/Thread.vue | 8 ++++++++ layouts/default.vue | 17 +++++++++++++---- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/components/i/library/Select.vue b/components/i/library/Select.vue index 79dd3df..9fd17e0 100644 --- a/components/i/library/Select.vue +++ b/components/i/library/Select.vue @@ -52,6 +52,7 @@ const { $isLibrarySelectOpen, $selectCollectionId, $selectThreadId, $collection } = storeToRefs(useLibraryStore()) const { $closeLibrarySelect, $openLibraryCreate, $setSelectCollectionId, $getCollection } = useLibraryStore() const { saveCollection, deleteCollectionRecord } = useCollectionRequest() +const emits = defineEmits(['success']) // ๅˆ้›†ๅˆ—่กจ const selected = ref([]) const loading = ref(false) @@ -83,6 +84,11 @@ async function handleSave() { loading.value = false handleClose() $getCollection() + emits('success', { + c_id: $selectThreadId.value, + collection_id: selected.value[0], + collection_name: $collection.value.find(i => i.id === selected.value[0]).name + }) } watch(() => $isLibrarySelectOpen.value, () => { selected.value = [...$selectCollectionId.value] diff --git a/components/i/library/Thread.vue b/components/i/library/Thread.vue index e157950..eace86d 100644 --- a/components/i/library/Thread.vue +++ b/components/i/library/Thread.vue @@ -41,6 +41,7 @@ \ No newline at end of file diff --git a/layouts/default.vue b/layouts/default.vue index 3e9e143..b7f1aa3 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -30,17 +30,26 @@ - + -- GitLab