| | |
| | | :limit="limit" |
| | | :list-type="drag ? 'picture' : 'picture-card'" |
| | | :multiple="multiple" |
| | | :name="name" |
| | | :on-change="handleChange" |
| | | :on-error="handleUploadError" |
| | | :on-exceed="handleExceed" |
| | |
| | | if (this.uploadList !== val) { |
| | | this.uploadList = this.getUploadList(val) |
| | | this.fileList = this.getUploadList(val) |
| | | console.log(this.fileList,'this.fileList this.fileList') |
| | | this.$emit('getUploaderImg',this.fileList) |
| | | } |
| | | }, |
| | | isShowCrop(value) { |
| | |
| | | // 获取已上传的文件列表 |
| | | getUploadList(val) { |
| | | if (val) { |
| | | console.log(val, 'getUploadList val') |
| | | // console.log(val, 'getUploadList val') |
| | | if (!this.multiple) { // 单选 |
| | | return [val] |
| | | } else { |
| | | console.log([...val], 'getUploadList [...val]') |
| | | // console.log([...val], 'getUploadList [...val]') |
| | | return [...val] |
| | | } |
| | | } else { |
| | |
| | | }, |
| | | // 上传成功回调 |
| | | handleUploadSuccess(response, file) { |
| | | console.log(response, file,'response, file') |
| | | if (response.code === 0) { |
| | | this.progressPercent = 100 |
| | | this.uploading = false |