15032 上传头像 没有判空
parent
e37efe2bf8
commit
8cf172365f
|
@ -39,6 +39,13 @@ export default {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
|
if (!this.fileList || !this.fileList.length || this.fileList.length === 0) {
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: '请上传图片!'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('PHOTO', this.fileList[0].raw)
|
formData.append('PHOTO', this.fileList[0].raw)
|
||||||
|
|
Loading…
Reference in New Issue