fix: 修改 text未正确保存的问题

This commit is contained in:
zhangyu
2021-12-24 14:13:58 +08:00
parent 9d2a4b8e8b
commit 765a6e6cc6
3 changed files with 16 additions and 20 deletions

View File

@@ -139,11 +139,12 @@ export default {
richTextEditor
},
watch: {
'chartConfig.param.text': {
handler (n) {
this.change()
}
}
// 'chartConfig.param.text': {
// handler (n) {
// console.log(n)
// this.change()
// }
// }
},
data () {
return {
@@ -218,8 +219,10 @@ export default {
this.change()
}
},
textChange () {
this.chartConfig.param.text = this.$refs.richTextEditor.getContent()
textChange (val) {
const html = `<div class="editor-core ql-container ql-snow"><div class="ql-editor">${val}</div></div>`
this.chartConfig.param.text = html
this.change()
}
},
created () {