const editor = new Editor(this.$refs.editorcontainer);
editor.config.height = 300;
editor.config.customUploadImg = async (files, insertImgFn) => {
for (let file of files) {
const param = new FormData();
param.append("file", file);
const res = await this.$http.post(
buildUrl("/sys/oss/upload", false),param,
{
headers: { "Content-Type": "multipart/form-data" },
}
);
insertImgFn(res.data.data.url);
}
};
wangeditor自定义上传图片到服务器
最新推荐文章于 2024-07-31 14:35:30 发布