This commit is contained in:
dhr
2025-08-21 01:38:57 +08:00
35 changed files with 3060 additions and 728 deletions

View File

@ -310,11 +310,11 @@ const uploadedSuccessfully = (res: any) => {
emit('update:modelValue', listToString(fileList.value));
proxy?.$modal.closeLoading();
}
if (props.autoUpload && props.limit === fileList.value.length) {
fileUploadRef.value?.clearFiles();
fileList.value = [];
emit('update:modelValue', ''); // 同步到外部 v-model
}
// if (props.autoUpload && props.limit === fileList.value.length) {
// fileUploadRef.value?.clearFiles();
// fileList.value = [];
// emit('update:modelValue', ''); // 同步到外部 v-model
// }
props.onUploadSuccess?.(fileList.value, res);
};
@ -359,6 +359,8 @@ const customUpload = async (options: any) => {
});
handleUploadSuccess(res.data, options.file);
} catch (err) {
console.log(err, 'err');
handleUploadError();
}
} else {