<template>
  <el-dialog title="报名页面" :visible.sync="applyInfo.dialogVisible" class="order-details">
    <UE
      :editorId="activeName"
      :defaultMsg="versionRow.content"
      :config="config"
      ref="ue"
      @ready="editorReadyEvent"
    ></UE>
  </el-dialog>
</template>
<script>
import UE from "../../modal/Ueditor"; //百度ue富文本
export default {
  applyInfo: {
    handler: function(val, oldval) {
      console.log(val);
      console.log(oldval);
    },
    deep: true //对象内部的属性监听，也叫深度监听
  },
  props: {
      applyInfo:Object
  },
  components: {
    UE
  },
  created() {
      console.log(this.applyInfo);
      
  },
  data() {
    return {
      dialogVisible: false,
      activeName: "first",
      versionRow: {
        content: ""
      },
      config: {
        initialFrameWidth: null,
        initialFrameHeight: 350
      }
    };
  },
  methods: {
    editorReadyEvent(instance) {
      let t = this;
      instance.addListener("contentChange", () => {
        if (t.activeName == "first") {
          t.versionRow.content = instance.getContent();
        }
      });
    }
  }
};
</script>