vue+wangEditor无效的节点选择器

<template>
  <div>
    <div id="div1" style="width:100%;height:200px;"></div>
  </div>
</template>
<script>
import E from "wangeditor";
export default {
  data(){
    return{
      editor:null,
    }
  },
  mounted(){
    this.init();
  },
  methods:{
    init(){
      this.editor=new E ('#div1');
      this.editor.create();
    }
  }
}
</script>

放在mounted生命周期内

你可能感兴趣的:(WangEditor,elementUI,vue,vue.js,javascript,ecmascript)