From 2b6eaedf05c18cbd3a340a2dfd611f9c1d51e2ab Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 1 Nov 2024 18:30:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E7=9A=84=E5=9B=BE=E7=89=87=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=8E=9F=E6=9C=89=E7=A7=BB=E5=8A=A8=E7=AB=AF=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/store/modules/data-visualization/copy.ts | 5 +++++ .../src/store/modules/data-visualization/dvMain.ts | 5 ++++- .../chart/components/editor/editor-style/ChartStyle.vue | 5 +++-- core/core-frontend/src/views/mobile/index.vue | 2 ++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/store/modules/data-visualization/copy.ts b/core/core-frontend/src/store/modules/data-visualization/copy.ts index 071335bde0..e0bb75871f 100644 --- a/core/core-frontend/src/store/modules/data-visualization/copy.ts +++ b/core/core-frontend/src/store/modules/data-visualization/copy.ts @@ -200,7 +200,12 @@ function deepCopyHelper(data, idMap) { const newComponentId = generateID() idMap[data.id] = newComponentId result.id = newComponentId + // 复制清理移动端样式 result.inMobile = false + delete result.mStyle + delete result.mEvents + delete result.mPropValue + delete result.mCommonBackgroud if (result.component === 'Group') { result.propValue.forEach((component, i) => { result.propValue[i] = deepCopyHelper(component, idMap) diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index 154a6726df..151b26e04c 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -404,12 +404,15 @@ export const dvMainStore = defineStore('dataVisualization', { Object.keys(idMap).forEach(function (oldComponentId) { if (canvasViewInfoPre[oldComponentId]) { const newComponentId = idMap[oldComponentId] - _this.canvasViewInfo[newComponentId] = { + const newView = { ...deepCopy(canvasViewInfoPre[oldComponentId]), id: newComponentId, linkageActive: false, jumpActive: false } + newView['customAttrMobile'] = null + newView['customStyleMobile'] = null + _this.canvasViewInfo[newComponentId] = newView } }) } diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue index abe39b98e2..cf492ff552 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue @@ -30,7 +30,7 @@ import CommonEvent from '@/custom-component/common/CommonEvent.vue' import CommonBorderSetting from '@/custom-component/common/CommonBorderSetting.vue' const dvMainStore = dvMainStoreWithOut() -const { dvInfo, batchOptStatus, curComponent } = storeToRefs(dvMainStore) +const { dvInfo, batchOptStatus, mobileInPc } = storeToRefs(dvMainStore) const { t } = useI18n() const state = { @@ -445,8 +445,9 @@ watch( @onLabelChange="onLabelChange" /> + // tooltip 为鼠标悬停 移动端看不到效果 不再单独配置 { activeTabbar.value = wsCache.get('activeTabbar') || 'home'