温州企业自助建站系统,世界各国足球联赛排名,哪些网站用django做的,支持微信支付的网站开发要点说明#xff1a;
使用:http-request覆盖默认的上传行为#xff0c;可以添加除文件外的其他参数#xff0c;注意此时仍需保留action属性#xff0c;action可以传个空串给http-request属性绑定的函数#xff0c;函数入参必须为param调用接口请求#xff0c;注意 heade… 要点说明
使用:http-request覆盖默认的上传行为可以添加除文件外的其他参数注意此时仍需保留action属性action可以传个空串给http-request属性绑定的函数函数入参必须为param调用接口请求注意 headers:{ content-type:multipart/form-data }时请求参数需要通过new FormData()方式传入 获取上传接口返回值this.uploadFileUrl2 res.data.data
el-uploadclassuploaddragaction:http-requestuploadFileHttp1:datauploadData:file-listfileList:limit1list-typepicturei classel-icon-upload/idiv classel-upload__text图片1em点击上传/em/div/el-upload data() {return {fileList: [],uploadFileUrl1:}}, uploadFileHttp1(param) {var file param.file let params new FormData()params.append(upload_type, public);params.append(file, file);axios({method:post,url:https://xxxxx/upload_file,data:params,headers:{content-type:multipart/form-data}}).then(res {console.log(res)this.uploadFileUrl1 res.data.data}).catch(err {console.log(err)})},