Commit 4884f72a authored by “yiyousong”'s avatar “yiyousong”

perf: 优化富文本图片上传

parent 156030ca
...@@ -184,7 +184,7 @@ export default { ...@@ -184,7 +184,7 @@ export default {
// 获取光标所在位置 // 获取光标所在位置
let length = quill.getSelection().index; let length = quill.getSelection().index;
// 插入图片 res.url为服务器返回的图片地址 // 插入图片 res.url为服务器返回的图片地址
quill.insertEmbed(length, "image", this.api + url); quill.insertEmbed(length, "image", url);
// 调整光标到最后 // 调整光标到最后
quill.setSelection(length + 1); quill.setSelection(length + 1);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment