fix(去重): 历史任务弹层补下载/删除按钮(漏了 history-item-actions 插槽)
任务面板的 #item-actions 只作用于「当前任务」列表,历史结果全部只在 #history-item-actions 弹层里渲染。16 个工具页里唯独去重页只给了前者, 表现为用户反馈「历史任务里压根没下载按钮」(既无下载也无删除)。 接口数据(success/resultId/downloadUrl)完整、类型检查与单测均不报错, 只能靠点开历史弹层才能发现。
This commit is contained in:
@@ -107,6 +107,19 @@
|
|||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</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>
|
</TaskCenterPanel>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user