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

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

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

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