editor.customConfig.customUploadImg = (files, insert) => {
for (var i = 0; i < files.length; i++) {
var formData = new FormData();
formData.append("file", files[i], files[i].name);
axios.post(this.imgupload, formData, {
// 上传图片接口
headers: {
'Content-Type': 'multipart/form-data',
},
}).then(da => {
console.log(da)
if (da.data.code == 200) {
console.log(da.data.data.path)
insert('/file'+ da.data.data.path);
} else {
alert(da.data.data.msg);
return;
}
})
}
};