Merge pull request #3180 from dataease/pr@dev@fix_rich-text-view

fix(仪表板): 修复富文本视图动态值被固定问题
This commit is contained in:
xuwei-fit2cloud 2022-09-26 13:54:55 +08:00 committed by GitHub
commit 50350a51dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,7 @@ export default {
data() {
return {
initReady: false,
editReady: false,
editShow: true,
canEdit: false,
//
@ -109,6 +110,9 @@ export default {
//
active(val) {
if (!val) {
if (this.canEdit) {
this.element.propValue.textValue = this.myValue
}
this.canEdit = false
this.reShow()
this.myValue = this.assignment(this.element.propValue.textValue)
@ -117,9 +121,6 @@ export default {
}
},
myValue(newValue) {
if (this.canEdit) {
this.element.propValue.textValue = newValue
}
this.initReady&&this.$store.commit('canvasChange')
}
},
@ -195,6 +196,8 @@ export default {
this.canEdit = true
this.element['editing'] = true
this.myValue = this.element.propValue.textValue
const ed = tinymce.editors[this.tinymceId]
ed.setContent(this.myValue)
this.reShow()
}
},