From eccb39acadc667ef484d08263e144632d51cea80 Mon Sep 17 00:00:00 2001
From: Min <39849555+MinGlizz@users.noreply.github.com>
Date: Wed, 8 Mar 2023 15:06:45 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A2=84=E8=A7=88=E9=87=87=E7=94=A8pin?=
=?UTF-8?q?ia=E9=A9=B1=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/ChartEvent/index.vue | 2 ++
.../components/PreviewRenderList/index.vue | 23 ++++++++--------
src/views/preview/index.vue | 27 +++++++++++--------
src/views/preview/utils/storage.ts | 15 +++++++----
4 files changed, 39 insertions(+), 28 deletions(-)
diff --git a/src/views/chart/ContentConfigurations/components/ChartEvent/index.vue b/src/views/chart/ContentConfigurations/components/ChartEvent/index.vue
index 05e5ce4d..6b18e79b 100644
--- a/src/views/chart/ContentConfigurations/components/ChartEvent/index.vue
+++ b/src/views/chart/ContentConfigurations/components/ChartEvent/index.vue
@@ -5,6 +5,7 @@
组件 id:
{{ targetData.id }}
+
@@ -12,6 +13,7 @@
diff --git a/src/views/preview/index.vue b/src/views/preview/index.vue
index e11a3092..4209edab 100644
--- a/src/views/preview/index.vue
+++ b/src/views/preview/index.vue
@@ -1,5 +1,5 @@
-
@@ -36,25 +36,30 @@ import { useScale } from './hooks/useScale.hook'
import { useStore } from './hooks/useStore.hook'
import { PreviewScaleEnum } from '@/enums/styleEnum'
import type { ChartEditStorageType } from './index.d'
+import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
-const localStorageInfo: ChartEditStorageType = getSessionStorageInfo() as ChartEditStorageType
-setTitle(`预览-${localStorageInfo.editCanvasConfig.projectName}`)
+// const localStorageInfo: ChartEditStorageType = getSessionStorageInfo() as ChartEditStorageType
+
+const chartEditStore = useChartEditStore() as unknown as ChartEditStorageType
+getSessionStorageInfo()
+
+setTitle(`预览-${chartEditStore.editCanvasConfig.projectName}`)
const previewRefStyle = computed(() => {
return {
- ...getEditCanvasConfigStyle(localStorageInfo.editCanvasConfig),
- ...getFilterStyle(localStorageInfo.editCanvasConfig)
+ ...getEditCanvasConfigStyle(chartEditStore.editCanvasConfig),
+ ...getFilterStyle(chartEditStore.editCanvasConfig)
}
})
const showEntity = computed(() => {
- const type = localStorageInfo.editCanvasConfig.previewScaleType
+ const type = chartEditStore.editCanvasConfig.previewScaleType
return type === PreviewScaleEnum.SCROLL_Y || type === PreviewScaleEnum.SCROLL_X
})
-useStore(localStorageInfo)
-const { entityRef, previewRef } = useScale(localStorageInfo)
-const { show } = useComInstall(localStorageInfo)
+useStore(chartEditStore)
+const { entityRef, previewRef } = useScale(chartEditStore)
+const { show } = useComInstall(chartEditStore)