vue引用ueditor控制台显示'UE' is not defined的解决方法

将 UE.getEditor() 更改为 window.UE.getEditor() 即可

原始代码:

   
 const _this = this
    const config = {}
    this.editor = UE.getEditor('content',config)
    this.editor.addListener('ready', function() {
      _this.editor.setContent('默认内容')
    })

修改后


const _this = this
const config = {}
this.editor = window.UE.getEditor('content',config)
this.editor.addListener('ready', function() {
  _this.editor.setContent('默认内容')
})

你可能感兴趣的:(vue)