
<template>
  <div class="content">
    <vue-ueditor-wrap v-model="value"
                      :destroy="true"
                      :config="editorConfig"
                      :editorDependencies="['ueditor.config.js','ueditor.all.js']"
                      />
  </div>
</template>
<script>
import VueUeditorWrap from 'vue-ueditor-wrap';

export default {
  components:{
    VueUeditorWrap
  },
  props: {
    /* 编辑器的内容 */
    value: {
      type: String,
      default: "",
    }
  },
  watch: {
    value(newVaue,oldValue){
      this.$emit('input', newVaue);
    }
  },
  mounted(){

  },
  data() {
    return {
      editorConfig: {
        // 编辑器后端服务接口，参考后端规范 https://open-doc.modstart.com/ueditor-plus/backend.html
        serverUrl: process.env.VUE_APP_BASE_API+'/sys/ueditor/exec',
        UEDITOR_HOME_URL: '/UEditor/',
        //**代码补充231218**
        UEDITOR_CORS_URL: '/UEditor/',
        zIndex: 999,//设置z轴顺序值，避免工具栏下拉组件被遮挡
      }
    }
  }
}
</script>
