Преглед изворни кода

缺陷页面上传图片bug修复

PrinceLee пре 5 година
родитељ
комит
122292ba19

+ 4 - 2
src/views/projectManage/bugList/details/index.vue

@@ -860,10 +860,12 @@ export default {
       this.dialogVisible = true
     },
     handleChange(response, file, fileList) {
-      this.fileDbList.push({
+      const item = {
         name: file.name,
         url: 'http:' + file.response.url
-      })
+      }
+      this.fileDbList.push(item)
+      this.fileList.push(item)
       this.bug.accessory = JSON.stringify(this.fileDbList)
       this.$message({
         showClose: true,

+ 3 - 1
src/views/projectManage/bugList/file/createdBug.vue

@@ -350,7 +350,9 @@ export default {
     },
     // 上传成功回调
     handleChange(response, file, fileList) {
-      this.fileDbList.push({ 'name': file.name, 'url': 'http:' + file.response.url })
+      const item = { 'name': file.name, 'url': 'http:' + file.response.url }
+      this.fileDbList.push(item)
+      this.fileList.push(item)
       this.formInline.accessory = JSON.stringify(this.fileDbList)
       this.dis = false
       this.$message({ showClose: true, message: '文件上传成功', type: 'success' })