upd: 输入回调设置到表单值
This commit is contained in:
@@ -108,6 +108,7 @@ export default {
|
||||
// 纯文本内容
|
||||
const text = editor.getText()
|
||||
this.$emit('change', html, text)
|
||||
this.$emit('input', html, text)
|
||||
},
|
||||
/**
|
||||
* 编辑器销毁时的回调函数。调用 editor.destroy() 即可销毁编辑器
|
||||
|
||||
@@ -68,6 +68,7 @@ export default {
|
||||
this.editor.setOption('readOnly', this.readOnly)
|
||||
this.editor.on('change', cm => {
|
||||
this.$emit('change', cm.getValue())
|
||||
this.$emit('input', cm.getValue())
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user