This commit is contained in:
2026-08-12 18:16:44 +08:00
parent 9d9b8943b8
commit 4c12831ee0
25 changed files with 75 additions and 19 deletions
@@ -17,5 +17,7 @@ describe('TruckAttachmentDialog interaction governance', () => {
expect(source).not.toContain('输入文件服务 ID')
expect(source).toContain('deleteTruckAppointmentAttachment')
expect(source).toContain('<Trash2 :size="15" />删除')
expect(source).toContain('size="small" type="danger" plain')
expect(source).not.toContain(' text type="danger"')
})
})
@@ -16,7 +16,7 @@ async function remove(item: TruckAttachmentReference) { if (!props.appointmentId
<el-empty v-if="attachments.length === 0" description="暂无预约附件" :image-size="72" />
<div v-for="item in attachments" :key="item.fileId" class="attachment-row">
<div><strong>{{ item.fileName || '未命名文件' }}</strong><small>{{ attachmentTypeLabel(item.attachmentType) }}{{ item.uploadedAt ? ` · ${item.uploadedAt}` : '' }}</small></div>
<el-button v-if="props.appointmentId && props.canManage && item.id" text type="danger" :loading="busy" @click="remove(item)"><Trash2 :size="15" />删除</el-button>
<el-button v-if="props.appointmentId && props.canManage && item.id" size="small" type="danger" plain :loading="busy" @click="remove(item)"><Trash2 :size="15" />删除</el-button>
</div>
<template #footer><el-button type="primary" @click="emit('update:modelValue', false)">关闭</el-button></template>
</el-dialog>