Merge pull request #3185 from dataease/pr@dev@fix_rich-text-delete

fix(仪表板): 修复富文本视图部分情况下字段要删两次的情况
This commit is contained in:
Junjun 2022-09-26 17:00:04 +08:00 committed by GitHub
commit 1322dd9ab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,13 +110,13 @@ export default {
// //
active(val) { active(val) {
if (!val) { if (!val) {
const ed = tinymce.editors[this.tinymceId]
if (this.canEdit) { if (this.canEdit) {
this.element.propValue.textValue = this.myValue this.element.propValue.textValue = ed.getContent()
} }
this.canEdit = false this.canEdit = false
this.reShow() this.reShow()
this.myValue = this.assignment(this.element.propValue.textValue) this.myValue = this.assignment(this.element.propValue.textValue)
const ed = tinymce.editors[this.tinymceId]
ed.setContent(this.myValue) ed.setContent(this.myValue)
} }
}, },