api地址:https://www.vue2editor.com/api.html#props
参考:https://zhuanlan.zhihu.com/p/100985112
<vue-editor v-model="listInfo.infoContent"
use-custom-image-handler
@image-added="handleImageAdded"
/>
handleImageAdded: function(file, Editor, cursorLocation, resetUploader) {
var formData = new FormData()
formData.append('file', file)
getfile('file-upload', formData).then(res => {
const url = `https://yjglpt-dh.oss-cn-beijing.aliyuncs.com/${
res.resp.file_url
}` // Get url from response
Editor.insertEmbed(cursorLocation, 'image', url)
resetUploader()
})
},