Handlesave () { const FORMDATA = new FormData (); /* eslint-disable */ for (let key in This.datainfo) { if (Object.prototype.hasOwnProperty.call (This.datainfo, Key) { formdata.append (key, This.datainfo[key]);} } Let para = { headers: {' content-type ': ' Multipart/form-data '},style: ' styletype ', path: ' Paths ', city:1} ; this. $http. Post (' Http://img.zeju.cn/zejuimg/img/upload ', FormData, para) . Then ((res) = { Console.log (res);} );
<el-uploadclass= "Avatar-uploader" action= "" : Show-file-list= "false": on-success= " Handleavatarsuccesslogopc ": on-error=" Handleavatarerrorlogopc " : on-progress=" HANDLEPROGRESSLOGOPC ": Before-upload= "Beforeuploadlogopc": http-request= "Handlesave" ><i v-else class=" El-icon-plus avatar-uploader-icon "ref=" PlusIcon "></i ><p id= "BOTTOMPC" style= "Position:absolute;bottom:0;background:rgba (0,0,0,.3); color: #fff; width:100%;margin : 0;padding:5px; " > Click upload Image </p><el-progress v-show= "Showflaglogopc" type= "Circle":p ercentage= "Progressinglogopc": status= "Statuslogopc" style= "position:absolute;top:10%;left:15%;" ></el-progress></el-upload>
vue-update-form-form replication method upload a picture