From 60ed8786388268ac6dfc9c1af3e9b5cca7a8fdcd Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 1 Nov 2024 17:37:53 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E8=AE=BE=E8=AE=A1=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E8=BF=94=E5=9B=9EPC=E8=AE=BE=E8=AE=A1=E7=AB=AF?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/visualization/common/DragInfo.vue | 2 ++ core/core-frontend/src/views/dashboard/MobileConfigPanel.vue | 1 + core/core-frontend/src/views/dashboard/index.vue | 1 + core/core-frontend/src/views/mobile/panel/index.vue | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/components/visualization/common/DragInfo.vue b/core/core-frontend/src/components/visualization/common/DragInfo.vue index 5afd1345ec..df78bc02c2 100644 --- a/core/core-frontend/src/components/visualization/common/DragInfo.vue +++ b/core/core-frontend/src/components/visualization/common/DragInfo.vue @@ -16,6 +16,8 @@ import dvDragTips from '@/assets/svg/dv-drag-tips.svg' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { storeToRefs } from 'pinia' +import { useI18n } from '@/hooks/web/useI18n' +const { t } = useI18n() const dvMainStore = dvMainStoreWithOut() const { dvInfo, mobileInPc } = storeToRefs(dvMainStore) diff --git a/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue b/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue index 2321fe8294..046e7d311e 100644 --- a/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue +++ b/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue @@ -251,6 +251,7 @@ const handleBack = () => { mobileStatusChange('mobilePatch', undefined) return } + dvMainStore.setCurComponent({ component: null, index: null }) ElMessageBox.confirm('当前的更改尚未保存,确定退出吗?', { confirmButtonType: 'primary', type: 'warning', diff --git a/core/core-frontend/src/views/dashboard/index.vue b/core/core-frontend/src/views/dashboard/index.vue index 68f56a2b55..ebea2a420d 100644 --- a/core/core-frontend/src/views/dashboard/index.vue +++ b/core/core-frontend/src/views/dashboard/index.vue @@ -122,6 +122,7 @@ const onMobileConfig = () => { dvMainStore.setCanvasStyle(canvasStyleDataCopy) nextTick(() => { mobileConfig.value = true + dvMainStore.setCurComponent({ component: null, index: null }) }) } diff --git a/core/core-frontend/src/views/mobile/panel/index.vue b/core/core-frontend/src/views/mobile/panel/index.vue index d39ea5e610..af4f333e06 100644 --- a/core/core-frontend/src/views/mobile/panel/index.vue +++ b/core/core-frontend/src/views/mobile/panel/index.vue @@ -28,7 +28,7 @@ const hanedleMessage = event => { ele.y = my ele.sizeX = mSizeX ele.sizeY = mSizeY - ele.style = mStyle || ele.style + ele.style = deepCopy(mStyle || ele.style) ele.commonBackground = deepCopy(mCommonBackground || ele.commonBackground) ele.events = deepCopy(mEvents || ele.events) ele.propValue = deepCopy(mPropValue || ele.propValue)