From b234b4cfa290635d4136fe9fe6cd266caff9210c Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 15 May 2024 09:18:19 +0800
Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=AA=E8=A1=A8=E6=9D=BF=E7=BC=93=E5=AD=98?=
=?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=8D=A2=E6=96=87=E6=A1=88=E5=9B=BE=E6=A0=87?=
=?UTF-8?q?=E7=AD=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/core-frontend/src/assets/svg/warn-tree.svg | 2 +-
.../src/components/visualization/CanvasCacheDialog.vue | 6 ++----
core/core-frontend/src/views/dashboard/index.vue | 2 ++
core/core-frontend/src/views/data-visualization/index.vue | 4 ++++
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/core/core-frontend/src/assets/svg/warn-tree.svg b/core/core-frontend/src/assets/svg/warn-tree.svg
index bbafc67e5b..7fdc95fff9 100644
--- a/core/core-frontend/src/assets/svg/warn-tree.svg
+++ b/core/core-frontend/src/assets/svg/warn-tree.svg
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/core/core-frontend/src/components/visualization/CanvasCacheDialog.vue b/core/core-frontend/src/components/visualization/CanvasCacheDialog.vue
index 9f13d7b8e7..e39d4034b6 100644
--- a/core/core-frontend/src/components/visualization/CanvasCacheDialog.vue
+++ b/core/core-frontend/src/components/visualization/CanvasCacheDialog.vue
@@ -1,10 +1,9 @@
@@ -47,8 +46,7 @@ const dialogInit = initInfo => {
const canvasTypeName = initInfo.canvasType === 'dataV' ? '数据大屏' : '仪表板'
dialogInfo.resourceId = initInfo.resourceId
dialogInfo.title = '存在未保存的' + canvasTypeName
- dialogInfo.tips =
- '检查到上次有' + canvasTypeName + '未能正常保存,是否使用上次未保存的' + canvasTypeName + '?'
+ dialogInfo.tips = canvasTypeName + '存在未保存的修改,立即恢复?'
dialogShow.value = true
}
diff --git a/core/core-frontend/src/views/dashboard/index.vue b/core/core-frontend/src/views/dashboard/index.vue
index 7ffcdc009c..eeb44d583b 100644
--- a/core/core-frontend/src/views/dashboard/index.vue
+++ b/core/core-frontend/src/views/dashboard/index.vue
@@ -117,6 +117,8 @@ const doUseCache = flag => {
dataInitState.value = true
setTimeout(() => {
snapshotStore.recordSnapshotCache()
+ // 使用缓存时,初始化的保存按钮为激活状态
+ snapshotStore.recordSnapshotCache('renderChart')
}, 1500)
} else {
initLocalCanvasData()
diff --git a/core/core-frontend/src/views/data-visualization/index.vue b/core/core-frontend/src/views/data-visualization/index.vue
index d3a138dd3f..099675987d 100644
--- a/core/core-frontend/src/views/data-visualization/index.vue
+++ b/core/core-frontend/src/views/data-visualization/index.vue
@@ -193,6 +193,10 @@ const doUseCache = flag => {
nextTick(() => {
dvMainStore.setDataPrepareState(true)
snapshotStore.recordSnapshotCache('renderChart')
+ setTimeout(() => {
+ // 使用缓存时,初始化的保存按钮为激活状态
+ snapshotStore.recordSnapshotCache('renderChart')
+ }, 2000)
})
} else {
initLocalCanvasData()