更新工作流分享功能

This commit is contained in:
jxxghp
2025-07-09 10:46:33 +08:00
parent 9f8dbf3c75
commit c7443d993e
7 changed files with 247 additions and 78 deletions

View File

@@ -113,9 +113,13 @@ async function fetchData({ done }: { done: any }) {
}
// 将数据从列表中移除
function removeData(id: number) {
function removeData(id: string) {
dataList.value = dataList.value.filter(item => item.id !== id)
}
onActivated(() => {
fetchData({ done: () => {} })
})
</script>
<template>
@@ -126,7 +130,7 @@ function removeData(id: number) {
<template #empty />
<div v-if="dataList.length > 0" class="grid gap-4 grid-workflow-share-card" tabindex="0">
<div v-for="data in dataList" :key="data.id">
<WorkflowShareCard :media="data" @delete="removeData(data.id || 0)" />
<WorkflowShareCard :workflow="data" @delete="removeData(data.id || '')" />
</div>
</div>
<NoDataFound
@@ -136,4 +140,4 @@ function removeData(id: number) {
:error-description="keyword ? t('common.noContent') : t('workflow.noShareData')"
/>
</VInfiniteScroll>
</template>
</template>