From 138f3d1abbd2d2898aa2508d6e578790fb545a78 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 17 Aug 2022 11:03:44 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E6=94=BE=E5=A4=A7=E6=8C=89=E9=92=AE=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=8F=AF=E4=BB=A5=E8=B7=9F=E9=9A=8F=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/canvas/custom-component/UserViewDialog.vue | 6 ++++-- .../canvas/custom-component/UserViewMobileDialog.vue | 7 ++++++- frontend/src/components/canvas/utils/style.js | 3 +++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/UserViewDialog.vue b/frontend/src/components/canvas/custom-component/UserViewDialog.vue index ce8a4e8a09..1f7b522301 100644 --- a/frontend/src/components/canvas/custom-component/UserViewDialog.vue +++ b/frontend/src/components/canvas/custom-component/UserViewDialog.vue @@ -10,7 +10,7 @@ :chart="mapChart || chart" class="chart-class" /> - + @@ -153,9 +153,11 @@ export default { return null } }, - mounted() { + created() { this.element = deepCopy(this.curComponent) }, + mounted() { + }, methods: { exportExcel() { const _this = this diff --git a/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue b/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue index ec80419257..6f2fc6f56b 100644 --- a/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue +++ b/frontend/src/components/canvas/custom-component/UserViewMobileDialog.vue @@ -8,7 +8,7 @@ :chart="mapChart || chart" class="chart-class" /> - + @@ -32,6 +32,7 @@ import DeContainer from '@/components/dataease/DeContainer' import LabelNormalText from '@/views/chart/components/normal/LabelNormalText' import ChartComponentS2 from '@/views/chart/components/ChartComponentS2' import PluginCom from '@/views/system/plugin/PluginCom' +import { deepCopy } from '@/components/canvas/utils/utils' export default { name: 'UserViewMobileDialog', components: { ChartComponentS2, LabelNormalText, DeContainer, DeMainContainer, ChartComponentG2, ChartComponent, TableNormal, LabelNormal, PluginCom }, @@ -48,9 +49,13 @@ export default { data() { return { refId: null, + element: {}, lastMapChart: null } }, + created() { + this.element = deepCopy(this.curComponent) + }, computed: { customStyle() { diff --git a/frontend/src/components/canvas/utils/style.js b/frontend/src/components/canvas/utils/style.js index 3a539de589..153863dd9b 100644 --- a/frontend/src/components/canvas/utils/style.js +++ b/frontend/src/components/canvas/utils/style.js @@ -387,6 +387,9 @@ export function adaptCurThemeCommonStyleAll() { const componentData = store.state.componentData componentData.forEach((item) => { adaptCurThemeCommonStyle(item) + if (item.style.backgroundColor) { + delete item.style.backgroundColor + } }) }