提交 087bcd32 编写于 作者: View Design's avatar View Design

222

上级 5151fe09
...@@ -9,30 +9,48 @@ ...@@ -9,30 +9,48 @@
</UDropdown> </UDropdown>
</template> </template>
<script setup> <script setup>
const actionItems = [ const { $openLibrarySelect } = useLibraryStore()
[ const props = defineProps({
{ collection_id: {
label: '添加到收藏', type: [String, Number],
icon: 'i-heroicons-plus', default: ''
click: () => { },
handleOpenSelect() c_id: {
type: [String, Number],
default: ''
}
})
const actionItems = computed(() => {
let items
if (props.collection_id && props.c_id) {
items = [
{
label: '更改合集',
icon: 'i-heroicons-squares-plus',
click: () => {
}
},
{
label: '从收藏中移除',
icon: 'i-heroicons-x-mark'
} }
}, ]
{ } else {
label: '更改合集', items = [
icon: 'i-heroicons-squares-plus', {
click: () => { label: '添加到收藏',
handleOpenSelect() icon: 'i-heroicons-plus',
click: () => {
$openLibrarySelect(props.c_id)
}
} }
}, ]
{ }
label: '从收藏中移除', items.push({
icon: 'i-heroicons-x-mark' label: '删除主题',
}, icon: 'i-heroicons-trash'
{ })
label: '删除主题', return [items]
icon: 'i-heroicons-trash' })
}
]
]
</script> </script>
...@@ -35,7 +35,10 @@ ...@@ -35,7 +35,10 @@
@click="handleOpenSelect" @click="handleOpenSelect"
/> />
</UTooltip> </UTooltip>
<IActionThread /> <IActionThread
:collection_id="thread.collections.length ? thread.collections[0].collection_id : ''"
:c_id="item.c_id"
/>
</div> </div>
</div> </div>
<UDivider /> <UDivider />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册