vue-html5-editor
vue-html5-editor copied to clipboard
Vue2.4.1下双向绑定失效
新版本Vue使用:content.sync来进行双向绑定必须在 组件下watch加入一下代码
content(val) {
const content = this.$refs.content.innerHTML
if (val !== content) {
this.$refs.content.innerHTML = val
this.$emit('update:content', val)
}
}
@bao2314483 加了没用咧, 我还发现 根本 没有过watch里的content方法。。
use @change event