From b630421901a95f08658f1f527e880656c0d6d888 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 20 May 2024 18:20:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E6=9D=BF=E9=85=8D=E7=BD=AE=E5=A2=9E=E5=8A=A0=E9=AB=98?= =?UTF-8?q?=E7=BA=A7=E8=AE=BE=E7=BD=AE=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=99=A8=E9=85=8D=E8=89=B2=E7=AD=89=20#8443=20#8435?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/dashboard/DbCanvasAttr.vue | 7 ------ .../ComponentColorSelector.vue | 25 +++++++++++++++++++ .../dashboard-style/SeniorStyleSetting.vue | 23 ++++++++--------- .../chart/components/editor/util/chart.ts | 3 ++- .../views/components/ChartComponentS2.vue | 15 +++++++---- .../components/views/components/DrillPath.vue | 24 +++++++++++------- .../views/chart/components/views/index.vue | 10 ++++---- 7 files changed, 67 insertions(+), 40 deletions(-) diff --git a/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue b/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue index 99eb836e99..426e707421 100644 --- a/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue +++ b/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue @@ -146,13 +146,6 @@ const saveSelfSubject = () => { > - - - + + + + + @@ -174,7 +189,10 @@ import eventBus from '@/utils/eventBus' import { storeToRefs } from 'pinia' import CustomColorStyleSelect from '@/views/chart/components/editor/editor-style/components/CustomColorStyleSelect.vue' import elementResizeDetectorMaker from 'element-resize-detector' +import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' const { t } = useI18n() +const snapshotStore = snapshotStoreWithOut() + const props = defineProps({ themes: { type: String as PropType, @@ -191,6 +209,9 @@ const colorFormRef = ref(null) const colorForm = computed( () => canvasStyleData.value.component.chartColor as DeepPartial ) + +const seniorForm = computed(() => canvasStyleData.value.component.seniorStyleSetting) + const predefineColors = COLOR_PANEL const state = reactive({ @@ -215,6 +236,10 @@ const changeColorOption = (modifyName = 'value') => { changeColorCase(modifyName) } +const changePagerColorChange = () => { + snapshotStore.recordSnapshotCache() +} + const changeColorCase = modifyName => { colorForm.value['modifyName'] = modifyName emits('onColorChange', colorForm.value) diff --git a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue index 58c51044c6..4f65267c48 100644 --- a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue +++ b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue @@ -5,22 +5,22 @@ @@ -35,15 +35,13 @@ import { COLOR_PANEL } from '@/views/chart/components/editor/util/chart' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { useI18n } from '@/hooks/web/useI18n' import { cloneDeep } from 'lodash-es' -import { adaptCurThemeFilterStyleAll } from '@/utils/canvasStyle' import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' import eventBus from '@/utils/eventBus' -import { ElIcon } from 'element-plus-secondary' const { t } = useI18n() const dvMainStore = dvMainStoreWithOut() const snapshotStore = snapshotStoreWithOut() -const filterStyle = computed(() => { - return dvMainStore.canvasStyleData.component.filterStyle +const seniorStyleSetting = computed(() => { + return dvMainStore.canvasStyleData.component.seniorStyleSetting }) const state = reactive({ @@ -55,14 +53,13 @@ const state = reactive({ const initForm = () => { // do } -const themeChange = styleKey => { - dvMainStore.canvasStyleData.component.filterStyle = cloneDeep(filterStyle.value) - adaptCurThemeFilterStyleAll(styleKey) - snapshotStore.recordSnapshotCache('filterStyleSimpleSelector-themeChange') +const themeChange = () => { + dvMainStore.canvasStyleData.component.seniorStyleSetting = cloneDeep(seniorStyleSetting.value) + snapshotStore.recordSnapshotCache('seniorStyleSettingSimpleSelector-themeChange') } const handleHorizontalChange = (type, horizontal = 'titleLayout') => { - filterStyle.value[horizontal] = type + seniorStyleSetting.value[horizontal] = type themeChange(horizontal) } diff --git a/core/core-frontend/src/views/chart/components/editor/util/chart.ts b/core/core-frontend/src/views/chart/components/editor/util/chart.ts index 4650afe6c9..ac8affe189 100644 --- a/core/core-frontend/src/views/chart/components/editor/util/chart.ts +++ b/core/core-frontend/src/views/chart/components/editor/util/chart.ts @@ -158,7 +158,8 @@ export const SENIOR_STYLE_SETTING_LIGHT = { export const SENIOR_STYLE_SETTING_DARK = { linkageIconColor: '#ffffff', - drillLayerColor: '#ffffff' + drillLayerColor: '#ffffff', + pagerColor: '#ffffff' } export const FILTER_COMMON_STYLE_BASE = { diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue index a3513e3f6b..6fc89da2db 100644 --- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue +++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue @@ -29,7 +29,8 @@ import { useEmitt } from '@/hooks/web/useEmitt' import { trackBarStyleCheck } from '@/utils/canvasUtils' const dvMainStore = dvMainStoreWithOut() -const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc } = storeToRefs(dvMainStore) +const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc, canvasStyleData } = + storeToRefs(dvMainStore) const { emitter } = useEmitt() const props = defineProps({ @@ -420,6 +421,10 @@ const autoHeightStyle = computed(() => { height: 20 * scale.value + 8 + 'px' } }) + +const tabStyle = computed(() => [ + { '--de-pager-color': canvasStyleData.value.component.seniorStyleSetting.pagerColor } +])