return {
userForm: {
name:'',
username: '',
gender: '',
birthday: '',
email: '',
mobile: '',
image:''
},
}
handleAvatarSuccess(res, file) {
//this.imageUrl = URL.createObjectURL(file.raw);
this.userForm.image = URL.createObjectURL(file.raw);
console.log(this.imageUrl);
},
confirmModify () { // 确认修改
var that = this;
updateUserInfo(that.userForm).then((response)=> {
that.saveInfoAjax();
}).catch(function (error) {
console.log(error);
});
},
vue代码如上