| | |
| | | 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) |
| | |
| | | console.log('上传图片结束') |
| | | |
| | | // 上传结束 |
| | | if (!this.checkNeedUpload(this.uploadImgs)) { |
| | | if (!this.checkNeedUpload(uploadImgs)) { |
| | | console.log('上传轮播图结束') |
| | | this.callback && this.callback(this.uploadImgs) |
| | | this.callback && this.callback(uploadImgs) |
| | | } |
| | | }) |
| | | } |