long
2021-12-08 0e0365cb3abd31edcf0c09c3fc215027983dfca8
修复多图上传组件
1个文件已修改
7 ■■■■■ 已修改文件
src/components_simple/UploadMultipleImg.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components_simple/UploadMultipleImg.vue
@@ -123,11 +123,10 @@
        console.log('上传图片成功')
        // 根据uid 替换掉未上传的图片
        var uploadImgs = this.uploadImgs
        var uploadImgs = JSON.parse(JSON.stringify(this.uploadImgs))
        uploadImgs.forEach((o, i) => {
          if (o.uid === res.file.uid) uploadImgs[i] = { url: inf.imgUrl, status: 'success' }
        })
        this.uploadImgs = JSON.parse(JSON.stringify(uploadImgs))
        // 触发change时间激活v-model
        this.$emit('change', uploadImgs)
@@ -135,9 +134,9 @@
        console.log('上传图片结束')
        // 上传结束
        if (!this.checkNeedUpload(this.uploadImgs)) {
        if (!this.checkNeedUpload(uploadImgs)) {
          console.log('上传轮播图结束')
          this.callback && this.callback(this.uploadImgs)
          this.callback && this.callback(uploadImgs)
        }
      })
    }