From f77f1f6eb7204af1b7def4085e55a47077a25d49 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Wed, 6 Sep 2023 20:07:36 +0800 Subject: [PATCH 1/2] style: code format --- .../components/shapeAttr/SizeSelectorAntV.vue | 332 +++++++++--------- 1 file changed, 166 insertions(+), 166 deletions(-) diff --git a/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue b/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue index 96a544de6f..bbb8916efa 100644 --- a/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue +++ b/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue @@ -524,242 +524,242 @@ >
{{ $t('chart.fix') }} {{ $t('chart.dynamic') }} - - + - + - + - + - + /> + {{ item.name }} {{ $t('chart.fix') }} {{ $t('chart.dynamic') }} - - - - - - - - - {{ item.name }} - - - - - - - - - - - - - + + + + + + + + {{ item.name }} + + + + + + + + + + + + +
Date: Wed, 6 Sep 2023 21:45:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E6=A0=87=E9=A2=98=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E5=9C=A8=E9=83=A8=E5=88=86=E6=93=8D=E4=BD=9C=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=B8=8A=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/lang/en.js | 1 + core/frontend/src/lang/tw.js | 1 + core/frontend/src/lang/zh.js | 1 + core/frontend/src/views/chart/chart/chart.js | 7 ++++++ .../chart/components/ChartComponentG2.vue | 4 +-- .../chart/components/ChartComponentS2.vue | 4 +-- .../componentStyle/TitleSelector.vue | 14 +++++++++++ .../componentStyle/TitleSelectorAntV.vue | 14 +++++++++++ .../chart/components/normal/LabelNormal.vue | 4 +-- .../components/normal/LabelNormalText.vue | 4 +-- .../src/views/antv/chartmix/index.vue | 25 ++++++------------- .../src/views/antv/sankey/index.vue | 25 ++++++------------- .../src/views/antv/symbolmap/index.vue | 14 ++++++++--- 13 files changed, 70 insertions(+), 48 deletions(-) diff --git a/core/frontend/src/lang/en.js b/core/frontend/src/lang/en.js index ddd6e8b781..b10e87ca1c 100644 --- a/core/frontend/src/lang/en.js +++ b/core/frontend/src/lang/en.js @@ -1466,6 +1466,7 @@ export default { dimension_text_style: 'Name Style', dimension_letter_space: 'Name Letter Space', font_family: 'Font Family', + font_family_tip: 'The font will only take effect if it is installed on the operating system', letter_space: 'Letter Space', font_shadow: 'Font Shadow', chart_area: 'Area', diff --git a/core/frontend/src/lang/tw.js b/core/frontend/src/lang/tw.js index 7843fc63e1..9f374754f6 100644 --- a/core/frontend/src/lang/tw.js +++ b/core/frontend/src/lang/tw.js @@ -1465,6 +1465,7 @@ export default { dimension_text_style: '名稱樣式', dimension_letter_space: '名稱字間距', font_family: '字體', + font_family_tip: '只有操作系統上已安裝該字體才能生效', letter_space: '字間距', font_shadow: '字體陰影', chart_area: '面積圖', diff --git a/core/frontend/src/lang/zh.js b/core/frontend/src/lang/zh.js index 574a1bcb54..a39ad85887 100644 --- a/core/frontend/src/lang/zh.js +++ b/core/frontend/src/lang/zh.js @@ -1464,6 +1464,7 @@ export default { dimension_text_style: '名称样式', dimension_letter_space: '名称字间距', font_family: '字体', + font_family_tip: '只有操作系统上已安装该字体才能生效', letter_space: '字间距', font_shadow: '字体阴影', chart_area: '面积图', diff --git a/core/frontend/src/views/chart/chart/chart.js b/core/frontend/src/views/chart/chart/chart.js index 6eb7fa837e..1af8b92939 100644 --- a/core/frontend/src/views/chart/chart/chart.js +++ b/core/frontend/src/views/chart/chart/chart.js @@ -1146,6 +1146,13 @@ export const CHART_FONT_FAMILY = [ { name: '楷体', value: 'KaiTi' } ] +export const CHART_CONT_FAMILY_MAP = { + 'Microsoft YaHei': 'Microsoft YaHei', + 'SimSun': 'SimSun, "Songti SC", STSong', + 'SimHei': 'SimHei, Helvetica', + 'KaiTi': 'KaiTi, "Kaiti SC", STKaiti' +} + export const CHART_FONT_LETTER_SPACE = [ { name: '0px', value: '0' }, { name: '1px', value: '1' }, diff --git a/core/frontend/src/views/chart/components/ChartComponentG2.vue b/core/frontend/src/views/chart/components/ChartComponentG2.vue index 086615a457..1ae307cfba 100644 --- a/core/frontend/src/views/chart/components/ChartComponentG2.vue +++ b/core/frontend/src/views/chart/components/ChartComponentG2.vue @@ -55,7 +55,7 @@ import { baseRadarOptionAntV } from '@/views/chart/chart/radar/radar_antv' import { baseWaterfallOptionAntV } from '@/views/chart/chart/waterfall/waterfall' import { baseWordCloudOptionAntV } from '@/views/chart/chart/wordCloud/word_cloud' import TitleRemark from '@/views/chart/view/TitleRemark' -import { DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart' +import { CHART_CONT_FAMILY_MAP, DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart' import { baseMixOptionAntV } from '@/views/chart/chart/mix/mix_antv' import ChartTitleUpdate from './ChartTitleUpdate.vue' import { equalsAny } from '@/utils/StringUtils' @@ -429,7 +429,7 @@ export default { this.title_class.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal' this.title_class.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal' - this.title_class.fontFamily = customStyle.text.fontFamily ? customStyle.text.fontFamily : DEFAULT_TITLE_STYLE.fontFamily + this.title_class.fontFamily = customStyle.text.fontFamily ? CHART_CONT_FAMILY_MAP[customStyle.text.fontFamily] : DEFAULT_TITLE_STYLE.fontFamily this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px' this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none' } diff --git a/core/frontend/src/views/chart/components/ChartComponentS2.vue b/core/frontend/src/views/chart/components/ChartComponentS2.vue index deb834afdc..31d5e3ca22 100644 --- a/core/frontend/src/views/chart/components/ChartComponentS2.vue +++ b/core/frontend/src/views/chart/components/ChartComponentS2.vue @@ -97,7 +97,7 @@ import ViewTrackBar from '@/components/canvas/components/editor/ViewTrackBar' import { getRemark, hexColorToRGBA } from '@/views/chart/chart/util' import { baseTableInfo, baseTableNormal, baseTablePivot } from '@/views/chart/chart/table/table-info' import TitleRemark from '@/views/chart/view/TitleRemark' -import { DEFAULT_TITLE_STYLE, NOT_SUPPORT_PAGE_DATASET } from '@/views/chart/chart/chart' +import { CHART_CONT_FAMILY_MAP, DEFAULT_TITLE_STYLE, NOT_SUPPORT_PAGE_DATASET } from '@/views/chart/chart/chart' import ChartTitleUpdate from './ChartTitleUpdate.vue' import { mapState } from 'vuex' import DePagination from '@/components/deCustomCm/pagination.js' @@ -459,7 +459,7 @@ export default { this.$refs.title.style.fontSize = customStyle.text.fontSize + 'px' } - this.title_class.fontFamily = customStyle.text.fontFamily ? customStyle.text.fontFamily : DEFAULT_TITLE_STYLE.fontFamily + this.title_class.fontFamily = customStyle.text.fontFamily ? CHART_CONT_FAMILY_MAP[customStyle.text.fontFamily] : DEFAULT_TITLE_STYLE.fontFamily this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px' this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none' // 表格总计与分页颜色,取标题颜色 diff --git a/core/frontend/src/views/chart/components/componentStyle/TitleSelector.vue b/core/frontend/src/views/chart/components/componentStyle/TitleSelector.vue index d5691cc72e..0d52ad248e 100644 --- a/core/frontend/src/views/chart/components/componentStyle/TitleSelector.vue +++ b/core/frontend/src/views/chart/components/componentStyle/TitleSelector.vue @@ -50,6 +50,20 @@ :value="option.value" /> + +
+ + + +
+ +