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

原始代码:

   <script id="content" type="text/plain"></script>
 const _this = this
    const config = {}
    this.editor = UE.getEditor('content',config)
    this.editor.addListener('ready', function() {
      _this.editor.setContent('默认内容')
    })

修改后

<script id="content" type="text/plain"></script>
const _this = this
const config = {}
this.editor = window.UE.getEditor('content',config)
this.editor.addListener('ready', function() {
  _this.editor.setContent('默认内容')
})
Logo

前往低代码交流专区

更多推荐