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

222

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