Files
chaoyangpc/src/components/AboutUs.vue
2019-11-13 11:11:51 +08:00

47 lines
749 B
Vue

<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>