更新采购申请前端
This commit is contained in:
@@ -356,23 +356,23 @@ function handleUploadSuccess(res: any, file: any) {
|
||||
}
|
||||
}
|
||||
|
||||
// 上传结束处理
|
||||
// 上传结束处理:传出完整 fileList(含 name),便于父组件回显文件名
|
||||
const uploadedSuccessfully = () => {
|
||||
if (number.value > 0 && uploadList.value.length === number.value) {
|
||||
fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value);
|
||||
uploadList.value = [];
|
||||
number.value = 0;
|
||||
emit('update:modelValue', listToString(fileList.value));
|
||||
emit('update:modelValue', fileList.value);
|
||||
emit('change', listToString(fileList.value), fileList.value);
|
||||
}
|
||||
};
|
||||
|
||||
const handleRemove = (file: { name?: string }) => {
|
||||
if (file.name) {
|
||||
fileList.value = fileList.value.filter((f) => f.name !== file.name);
|
||||
emit('update:modelValue', listToString(fileList.value));
|
||||
emit('change', listToString(fileList.value), fileList.value);
|
||||
}
|
||||
const handleRemove = (file: { name?: string; id?: string; url?: string }) => {
|
||||
fileList.value = fileList.value.filter(
|
||||
(f) => !(f.id && f.id === file.id) && !(f.name && f.name === file.name)
|
||||
);
|
||||
emit('update:modelValue', fileList.value.length ? fileList.value : '');
|
||||
emit('change', listToString(fileList.value), fileList.value);
|
||||
};
|
||||
|
||||
const handlePreview = (file: any) => {
|
||||
|
||||
Reference in New Issue
Block a user