refactor(数据大屏): 富文本组件支持撤销操作

This commit is contained in:
wangjiahao 2024-02-19 16:29:45 +08:00
parent 3e7165318c
commit 2205709244
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