From fb6ca8accd572b79eb4f37c4f6f150f99ff2f704 Mon Sep 17 00:00:00 2001 From: ulleo Date: Wed, 16 Aug 2023 17:29:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81ECharts=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E6=9F=B1=E7=8A=B6=E5=9B=BE=E6=8F=92=E4=BB=B6=20slider?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2=E4=B8=8E=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/utils/style.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/canvas/utils/style.js b/frontend/src/components/canvas/utils/style.js index 1d1ac320e8..0161e10091 100644 --- a/frontend/src/components/canvas/utils/style.js +++ b/frontend/src/components/canvas/utils/style.js @@ -127,7 +127,10 @@ export const customAttrTrans = { ], 'tooltip': { 'textStyle': ['fontSize'] - } + }, + 'slider': [ + 'fontSize' + ] } export const customStyleTrans = { 'text': ['fontSize'], @@ -375,7 +378,7 @@ export function adaptCurTheme(customStyle, customAttr, chartType) { } } -export function adaptCurThemeCommonStyle(component,adaptFrom = 'them') { +export function adaptCurThemeCommonStyle(component, adaptFrom = 'them') { const commonStyle = store.state.canvasStyleData.chartInfo.chartCommonStyle for (const key in commonStyle) { Vue.set(component.commonBackground, key, commonStyle[key]) @@ -383,9 +386,9 @@ export function adaptCurThemeCommonStyle(component,adaptFrom = 'them') { if (isFilterComponent(component.component)) { const filterStyle = store.state.canvasStyleData.chartInfo.filterStyle for (const styleKey in filterStyle) { - if(adaptFrom === 'copy'){ + if (adaptFrom === 'copy') { Vue.set(component.style, styleKey, filterStyle[styleKey]) - }else if (adaptFrom === 'them' && styleKey !== 'horizontal' && styleKey !== 'vertical') { + } else if (adaptFrom === 'them' && styleKey !== 'horizontal' && styleKey !== 'vertical') { // 主题变化位置属性不修改 Vue.set(component.style, styleKey, filterStyle[styleKey]) }