vue-html5-editor icon indicating copy to clipboard operation
vue-html5-editor copied to clipboard

Vue2.4.1下双向绑定失效

Open bao2314483 opened this issue 7 years ago • 2 comments

新版本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 avatar Jul 26 '17 03:07 bao2314483

@bao2314483 加了没用咧, 我还发现 根本 没有过watch里的content方法。。

luffyzhao avatar Nov 02 '17 03:11 luffyzhao

use @change event

kakahikari avatar Dec 05 '17 03:12 kakahikari