From 5d3e0be26b31f7d6d29b3281adcb201ec494a1c6 Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期二, 22 八月 2023 12:51:12 +0800 Subject: [PATCH] 新增不同时显示“正在上传” --- ruoyi-ui/src/views/collection/index.vue | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/collection/index.vue b/ruoyi-ui/src/views/collection/index.vue index 52b9b8d..77dff43 100644 --- a/ruoyi-ui/src/views/collection/index.vue +++ b/ruoyi-ui/src/views/collection/index.vue @@ -315,7 +315,7 @@ <el-input v-model="formDat.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" ></el-input> </el-form-item> - <h4 class="form-header">鐢靛瓙鏂囦欢 </h4> + <h4 class="form-header">鐩稿叧鍥剧墖 </h4> <el-upload action="#" list-type="picture-card" @@ -365,6 +365,7 @@ :show-file-list="true" > <el-button type="primary">鐐瑰嚮涓婁紶</el-button> + <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div> <template #tip> <div class="el-upload__tip"> </div> @@ -443,7 +444,7 @@ dsb:true, btn:false, fit:['fill'], - + uploading: false, formDat: { //鏀惰棌涓庤崳瑾夎褰� id:undefined, @@ -779,10 +780,11 @@ var formData = new FormData(); formData.append('uploadFile', file); let _this = this - + this.uploading = true; uploadPic(formData).then(response => { let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) - + this.uploading = false; + this.$modal.msgSuccess("涓婁紶鎴愬姛"); if(_this.fot.includes(pth) === true) { _this.fileList.push({name:response.data.fileName, "url":response.data.url}) -- Gitblit v1.9.1