Merge pull request #10608 from dataease/pr@dev-v2@fix_rich-text

Pr@dev v2@fix rich text
This commit is contained in:
王嘉豪 2024-06-28 18:14:45 +08:00 committed by GitHub
commit 7a22734eb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -154,7 +154,7 @@ watch(
if (!val) {
const ed = tinymce.editors[tinymceId]
if (canEdit.value) {
element.value.propValue.textValue = ed.getContent()
element.value.propValue.textValue = ed?.getContent()
}
element.value['editing'] = false
canEdit.value = false
@ -170,7 +170,7 @@ watch(
() => {
if (canEdit.value) {
const ed = tinymce.editors[tinymceId]
element.value.propValue.textValue = ed.getContent()
element.value.propValue.textValue = ed?.getContent()
}
if (initReady.value && canEdit.value) {
snapshotStore.recordSnapshotCache('renderChart', element.value.id)
@ -231,7 +231,7 @@ const assignment = content => {
value = `<span style="color:${thresholdStyle.color};background-color: ${thresholdStyle.backgroundColor}">${value}</span>`
}
if (initReady.value) {
content = content.replace(itm, !!value ? value : '[未获取字段值]')
content = content.replace(itm, !!value ? value : '-')
} else {
content = content.replace(itm, !!value ? value : '[获取中...]')
}