From 2205709244610ef9376732a6d53c22ae12f15994 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 19 Feb 2024 16:29:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):?= =?UTF-8?q?=20=E5=AF=8C=E6=96=87=E6=9C=AC=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=92=A4=E9=94=80=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/rich-text/DeRichTextView.vue | 6 +++--- .../src/store/modules/data-visualization/snapshot.ts | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue index b3928e573d..5c190c4138 100644 --- a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue +++ b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue @@ -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(() => { diff --git a/core/core-frontend/src/store/modules/data-visualization/snapshot.ts b/core/core-frontend/src/store/modules/data-visualization/snapshot.ts index 9aceeb76f2..39eaac6374 100644 --- a/core/core-frontend/src/store/modules/data-visualization/snapshot.ts +++ b/core/core-frontend/src/store/modules/data-visualization/snapshot.ts @@ -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