<template>
    <div id="aboutUs"></div>
</template>

<script>
import E from 'wangeditor'
var phoneEditor, _this
export default {
  components: {},
  props: {
    aboutUsVal: {
      type: String,
      required: false
    }
  },
  data () {
    return {}
  },
  created () {},
  mounted () {
    _this = this
    phoneEditor = new E('aboutUs')
    phoneEditor.onchange = function () {
      _this.$emit('aboutUs', this.$txt.html())
    }

    phoneEditor.create()
    // phoneEditor.$txt.html(this.val)
  },
  methods: {},
  computed: {},
  watch: {
    aboutUsVal (val) {
      // console.log(val)
      phoneEditor.$txt.html(_this.aboutUsVal)
    }
  }
}
</script>

<style lang="scss" scoped>
#aboutUs {
  width: 100%;
  height: 250px;
}
</style>
