引用写在main.js里面
import '../static/UE/ueditor.config.js'
import '../static/UE/ueditor.all.min.js'
import '../static/UE/lang/zh-cn/zh-cn.js'
import '../static/UE/ueditor.parse.min.js'
组件钩子调用
mounted() {
const _this = this;
this.editor = UE.getEditor('editor', this.config); // 初始化UE
},
这个怎么解决,跳转路由,UEditor不会初始化
Ueditor有个销毁的函数是
UE.delEditor('实例的id')
,在beforeDestroy()
钩子里面写上就行,每次离开本页面的时候都会销毁实例,再次进入会重进初始化.