fix(去重): 历史任务弹层补下载/删除按钮(漏了 history-item-actions 插槽)

任务面板的 #item-actions 只作用于「当前任务」列表,历史结果全部只在
#history-item-actions 弹层里渲染。16 个工具页里唯独去重页只给了前者,
表现为用户反馈「历史任务里压根没下载按钮」(既无下载也无删除)。
接口数据(success/resultId/downloadUrl)完整、类型检查与单测均不报错,
只能靠点开历史弹层才能发现。
This commit is contained in:
2026-09-16 17:05:11 +08:00
parent ab28b168ec
commit 1c52cd529b
@@ -107,6 +107,19 @@
</button>
</template>
</template>
<!-- 历史结果只在历史任务弹层里展示弹层复用独立的 actions 插槽缺了就没有下载/删除按钮 -->
<template #history-item-actions="{ item }">
<template v-if="itemSource(item)">
<button v-if="itemSource(item).success && (itemSource(item).downloadUrl || itemSource(item).resultId)"
type="button" class="download" @click="downloadCleanResult(itemSource(item))">
下载文件
</button>
<button v-if="itemSource(item).resultId" type="button" class="btn-delete"
@click="deleteCleanHistoryRecord(itemSource(item).resultId!)">
删除
</button>
</template>
</template>
</TaskCenterPanel>
</section>
</div>