提交 507e4672 authored 作者: zfl's avatar zfl

上传文件加载动画

上级 0e759e50
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
:action=" :action="
IP + '/student/test_results/imageUpload/' + result_id IP + '/student/test_results/imageUpload/' + result_id
" "
:on-progress="uploadSubmit" :on-change="uploadSubmit"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:headers="headers" :headers="headers"
:show-file-list="false" :show-file-list="false"
...@@ -142,10 +142,7 @@ ...@@ -142,10 +142,7 @@
</el-upload> --> </el-upload> -->
</el-col> </el-col>
</el-row> </el-row>
<div class="grid-content_upload"> <div class="grid-content_upload" v-loading="is_loading" >
<div class="loading_box" v-if="is_loading">
<i class="el-icon-loading"></i>
</div>
<div class="upload_btn"> <div class="upload_btn">
<div <div
class="img_box" class="img_box"
...@@ -160,7 +157,7 @@ ...@@ -160,7 +157,7 @@
:action=" :action="
IP + '/student/test_results/imageUpload/' + result_id IP + '/student/test_results/imageUpload/' + result_id
" "
:on-progress="uploadSubmit" :on-change="uploadSubmit"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:headers="headers" :headers="headers"
drag drag
...@@ -319,9 +316,14 @@ export default { ...@@ -319,9 +316,14 @@ export default {
this.$message.error(res.message); this.$message.error(res.message);
} }
}, },
uploadSubmit(event, file, fileList) { uploadSubmit(file, fileList) {
console.log(file); console.log(file.status)
this.is_loading = true; // uploading ready error
if(file && (file.status=="success" || file.status=="error")){
this.is_loading = false;
}else{
this.is_loading = true;
}
}, },
}, },
}; };
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论