diff --git a/components/i/action/Collect.vue b/components/i/action/Collect.vue
new file mode 100644
index 0000000000000000000000000000000000000000..d83e9b84e54a526926ef1ecd1c11dda4957ed42a
--- /dev/null
+++ b/components/i/action/Collect.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
diff --git a/components/i/library/Create.vue b/components/i/library/Create.vue
index 5e091c4be9aff643657e6d5951a437c310b90288..7425b8c3ba63b58d113317e86092336166cf91f7 100644
--- a/components/i/library/Create.vue
+++ b/components/i/library/Create.vue
@@ -1,9 +1,14 @@
-
+
-
创建合集
+
创建合集
+
更新合集
+
@@ -54,11 +68,19 @@
const { $isLibraryCreateOpen } = storeToRefs(useLibraryStore())
const { $closeLibraryCreate, $getCollection } = useLibraryStore()
const { setOrUpdateCollection } = useCollectionRequest()
+const props = defineProps({
+ id: {
+ type: [String, Number],
+ default: ''
+ }
+})
+const updateVisible = ref(false)
const title = ref('')
const description = ref('')
const loading = ref(false)
function handleClose () {
- $closeLibraryCreate()
+ if (!props.id) $closeLibraryCreate()
+ else updateVisible.value = false
}
async function handleCreate () {
if (loading.value) return
@@ -72,4 +94,18 @@ async function handleCreate () {
$closeLibraryCreate()
$getCollection()
}
+function handleCloseModal () {
+ if (!props.id) $isLibraryCreateOpen.value = false
+ else updateVisible.value = false
+}
+function handleUpdate () {
+
+}
+function openUpdate () {
+ updateVisible.value = true
+ // todo 获取合集数据
+}
+defineExpose({
+ openUpdate
+})
diff --git a/components/i/library/Edit.vue b/components/i/library/Edit.vue
new file mode 100644
index 0000000000000000000000000000000000000000..4959541ab1196b04b11d0b2db8756433e93fe1a1
--- /dev/null
+++ b/components/i/library/Edit.vue
@@ -0,0 +1,18 @@
+
+
+
+
\ No newline at end of file
diff --git a/components/i/library/Header.vue b/components/i/library/Header.vue
index 0dccb4406619276736c2dcc3c239bcee9b55943c..1cd1b1bcb051802871c87f7bc80ef5f8aaf17acb 100644
--- a/components/i/library/Header.vue
+++ b/components/i/library/Header.vue
@@ -21,13 +21,18 @@
-
{{ description }}
@@ -48,6 +53,10 @@ defineProps({
count: {
type: Number,
default: 0
+ },
+ collectId: {
+ type: [String, Number],
+ default: ''
}
})
const searchQuery = ref('')
diff --git a/pages/library/[id].vue b/pages/library/[id].vue
index c1dd18450570d6db048f97b2555d037975200bbd..189458673bf312d71702c9a0abe75bdc7832816a 100644
--- a/pages/library/[id].vue
+++ b/pages/library/[id].vue
@@ -5,6 +5,7 @@
:collect="currentCollect.name"
:description="currentCollect.description"
:count="currentCollect.record_count"
+ :collect-id="currentCollect.id"
/>