fix图片上传组件上传失败处理

This commit is contained in:
不做码农 2022-05-26 19:03:14 +08:00
parent 907e3e7ff4
commit 713fbc1759

View File

@ -115,7 +115,7 @@ function handleUploadSuccess(res) {
if (res.code != 200) {
proxy.$modal.msgError(`上传失败,原因:${res.msg}!`)
proxy.$modal.closeLoading()
fileList.value = []
fileList.value = fileList.value.slice(0, fileList.value.length - 1)
return
}
uploadList.value.push({ name: res.data.fileName, url: res.data.url })