如题,还是技术小白,真不知道该怎么合适的引入,请教教!这个插件在vue中应该怎么写?
最近项目中刚用到
import Editor from 'wangeditor' export default { methods: { initEditor() { var editor = new Editor('#editor') // editor.customConfig.uploadImgShowBase64 = true // editor.customConfig.uploadImgServer = '/upload' editor.customConfig.uploadImgServer = '/upload'; editor.customConfig.uploadFileName = 'uploadfile'; editor.customConfig.uploadImgHooks = { customInsert: function (insertImg, result, editor) { var url = result.url insertImg(url) } } editor.customConfig.customAlert = (info) => { this.$Notice.info({title: info}) } editor.customConfig.onchange = (html) => { this.form.content = html } editor.create() } }, mounted() { this.initEditor() }
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
最近项目中刚用到