fix(接口测试): bugFix

This commit is contained in:
baiqi 2024-10-25 11:48:20 +08:00 committed by 刘瑞斌
parent fd83f2d362
commit 776c7edebc
3 changed files with 13 additions and 10 deletions

View File

@ -12,10 +12,12 @@
<template #content>
<div class="flex w-[200px] flex-col gap-[8px]">
<template v-if="alreadyDeleteFiles.length > 0">
<div class="flex items-center gap-[4px]">
<icon-exclamation-circle-fill class="!text-[rgb(var(--warning-6))]" :size="18" />
<div class="text-[var(--color-text-4)]">{{ t('ms.add.attachment.alreadyDelete') }}</div>
<MsButton type="text" :disabled="props.disabled" @click="clearDeletedFiles">
<div class="flex items-center justify-between">
<div class="flex items-center gap-[4px]">
<icon-exclamation-circle-fill class="!text-[rgb(var(--warning-6))]" :size="18" />
<div class="text-[var(--color-text-4)]">{{ t('ms.add.attachment.alreadyDelete') }}</div>
</div>
<MsButton type="text" :disabled="props.disabled" size="mini" @click="clearDeletedFiles">
{{ t('ms.add.attachment.quickClear') }}
</MsButton>
</div>
@ -27,7 +29,7 @@
<a-tooltip :content="t('ms.add.attachment.remove')">
<MsButton type="text" status="secondary" :disabled="props.disabled" @click="handleClose(file)">
<MsIcon
type="icon-icon_unlink"
type="icon-icon_delete-trash_outlined1"
:class="props.disabled ? '' : 'hover:text-[rgb(var(--primary-5))]'"
size="16"
/>
@ -148,6 +150,7 @@
function clearDeletedFiles() {
inputFiles.value = inputFiles.value.filter((item) => !item.delete);
fileList.value = fileList.value.filter((item) => !item.delete);
}
function handleClose(data: TagData) {

View File

@ -82,9 +82,9 @@
@open-save-as="handleOpenSaveAs"
@delete-file="emit('deleteFile', $event)"
>
<div class="h-full flex-1">
<div class="h-full w-[calc(100%-24px)]">
<MsTagsInput
v-model:model-value="inputFiles"
:model-value="inputFiles"
:input-class="props.inputClass"
placeholder=" "
:disabled="props.disabled"

View File

@ -993,8 +993,8 @@
record.files = files.map((e) => ({
...e,
fileId: e.uid || e.fileId || '',
fileName: e.originalName || '',
fileAlias: e.name || '',
fileName: e.originalName || e.name || e.fileName || '',
fileAlias: e.name || e.fileName || '',
}));
}
addTableLine(rowIndex);
@ -1030,7 +1030,7 @@
record.file = {
...files[0],
fileId: files[0].uid || files[0].fileId || '',
fileName: files[0].originalName || '',
fileName: files[0].originalName || files[0].fileName || '',
fileAlias: files[0].name || '',
};
} else {