Browse Source

reactor:文件上传失败提醒;

zhangchong 9 months ago
parent
commit
ae34c20aab
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/components/AnnexList/index.vue

+ 2 - 2
src/components/AnnexList/index.vue

@@ -150,8 +150,8 @@ const handleChangeFile = (file: any, fileList: any) => {
 };
 // 上传失败
 const onUploadError = (error: Error) => {
-	console.log(error);
-	ElMessage.error('上传失败');
+  const errMessage = JSON.parse(error.message)?.message ?? '上传失败';
+	ElMessage.error(errMessage);
 };
 // 删除
 const handleRemove = (uploadFile: any) => {