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 {
...@@ -194,8 +194,8 @@ export default { ...@@ -194,8 +194,8 @@ export default {
}, },
}, },
}; };
</script> </script>
<style> <style>
.editor { .editor {
line-height: normal !important; line-height: normal !important;
...@@ -395,4 +395,4 @@ export default { ...@@ -395,4 +395,4 @@ export default {
.ql-font-sans-serif { .ql-font-sans-serif {
font-family: "sans-serif"; font-family: "sans-serif";
} }
</style> </style>
\ No newline at end of file
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