| | |
| | | :visible.sync="updateImg" |
| | | width="1000px" |
| | | class="icon-dialog-wrapper dialong-com-style"> |
| | | <ImageCropper ref="iconShot" v-if="updateImg" :imgSrc="img" > |
| | | <ImageCropper ref="iconShot" v-if="updateImg" :imgSrc="img" :auto-crop="autoCrop"> |
| | | </ImageCropper> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="loading">取 消</el-button> |
| | |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | tipsLabel: '', |
| | | autoCrop: { |
| | | type: Object, |
| | | default () { |
| | | return { width: 500, height: 500 } |
| | | } |
| | | }, |
| | | // eslint-disable-next-line vue/require-prop-type-constructor |
| | | tipsLabel: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | customStyle: { |
| | | type: String, |
| | | default: 'width: 90px; height: 90px;' |
| | |
| | | data () { |
| | | return { |
| | | loading: false, |
| | | fileInfo:{}, |
| | | fileInfo: {}, |
| | | img: null, |
| | | updateImg: false, |
| | | imageSrc: null, |
| | |
| | | console.log(fileData) |
| | | const formData = new FormData() |
| | | |
| | | formData.append('folder', 'member') |
| | | if(this.uploadData.isFace || this.uploadData.isFace == 0){ |
| | | formData.append('folder', this.uploadData.folder || 'member') |
| | | if (this.uploadData.isFace || this.uploadData.isFace == 0) { |
| | | formData.append('isFace', 0) |
| | | } |
| | | formData.append( |
| | | 'file', |
| | | new File( |
| | | [fileData], // 将Blob类型转化成File类型 |
| | | this.fileInfo.name, // 设置File类型的文件名称 |
| | | { type: this.fileInfo.type } // 设置File类型的文件类型 |
| | | ) |
| | | 'file', |
| | | new File( |
| | | [fileData], // 将Blob类型转化成File类型 |
| | | this.fileInfo.name, // 设置File类型的文件名称 |
| | | { type: this.fileInfo.type } // 设置File类型的文件类型 |
| | | ) |
| | | ) |
| | | this.loading = true |
| | | upload(formData).then(res => { |