fix(仪表板): 修复富文本视图动态值被固定问题

This commit is contained in:
wangjiahao 2022-09-26 11:49:28 +08:00
parent 6e62f22223
commit db61cce94b

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()
}
},