Browse Source

上传文件失败提示修改

duy 2 năm trước cách đây
mục cha
commit
782939781b
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      src/views/tentative/material/components/HcDragUpload.vue

+ 3 - 2
src/views/tentative/material/components/HcDragUpload.vue

@@ -105,10 +105,11 @@ const uploadSuccess = ({code, data}) => {
 }
 
 //上传失败
-const uploadError = () => {
+const uploadError = (err) => {
+    let errmsg=JSON.parse(err.message).msg
     uploadDisabled.value = false
     emit('progress', false)
-    window?.$message?.error('上传失败');
+    window?.$message?.error(errmsg);
 }
 
 //文件改变时