Merge pull request #8057 from dataease/pr@dev@refactor_rich-text-adaptor

refactor(数据大屏): 富文本组件支持撤销操作
This commit is contained in:
王嘉豪 2024-02-19 16:30:26 +08:00 committed by GitHub
commit 0f58e9bce5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -164,8 +164,8 @@ watch(
const ed = tinymce.editors[tinymceId]
element.value.propValue.textValue = ed.getContent()
}
if (initReady.value) {
snapshotStore.recordSnapshotCache()
if (initReady.value && canEdit.value) {
snapshotStore.recordSnapshotCache('renderChart', element.value.id)
}
}
)
@ -405,7 +405,7 @@ const initCurFields = chartDetails => {
}
const renderChart = () => {
//do nothing
initCurFieldsChange()
}
onMounted(() => {

View File

@ -96,7 +96,10 @@ export const snapshotStore = defineStore('snapshot', {
})
}
})
if (!curComponentMatch) {
if (
!curComponentMatch ||
(curComponent.value.innerType && curComponent.value.innerType === 'rich-text')
) {
dvMainStore.setCurComponent({
component: null,
index: null