From 844f23b586bbda70e82d1fc0191f346ed39fd7d0 Mon Sep 17 00:00:00 2001 From: ulleo Date: Mon, 31 Mar 2025 17:59:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=9B=BE=E8=A1=A8):=20=E6=95=B0=E5=80=BC?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E5=86=85=EF=BC=8C=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E6=94=AF=E6=8C=81=E9=85=8D=E7=BD=AE=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E7=AE=80=E7=A7=B0=20#14335?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/locales/en.ts | 3 + core/core-frontend/src/locales/tw.ts | 3 + core/core-frontend/src/locales/zh-CN.ts | 3 + .../core-frontend/src/models/chart/chart.d.ts | 1 + .../components/ValueFormatterEdit.vue | 67 +- .../components/DualYAxisSelector.vue | 5 +- .../components/DualYAxisSelectorInner.vue | 127 ++-- .../editor-style/components/LabelSelector.vue | 649 +++++++++++------- .../components/TooltipSelector.vue | 237 ++++--- .../editor-style/components/XAxisSelector.vue | 121 ++-- .../editor-style/components/YAxisSelector.vue | 127 ++-- .../chart/components/editor/util/chart.ts | 3 + .../views/chart/components/js/formatter.ts | 105 ++- .../extensions/view/dto/FormatterCfgDTO.java | 1 + 14 files changed, 944 insertions(+), 508 deletions(-) diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index 916dae60af..d4f12cbc1e 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -1735,6 +1735,9 @@ export default { value_formatter_value: 'Number', value_formatter_percent: 'Percentage', value_formatter_unit: 'Unit', + value_formatter_unit_language: 'Language', + value_formatter_unit_language_ch: 'Chinese', + value_formatter_unit_language_en: 'English', value_formatter_decimal_count: 'Number of decimal places', value_formatter_suffix: 'Unit suffix', show_gap: 'Show interval value', diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index d7dbc87775..da374abeb0 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -1695,6 +1695,9 @@ export default { value_formatter_value: '數值', value_formatter_percent: '百分比', value_formatter_unit: '數量單位', + value_formatter_unit_language: '單位語言', + value_formatter_unit_language_ch: '中文', + value_formatter_unit_language_en: '英文', value_formatter_decimal_count: '小數位數', value_formatter_suffix: '單位字尾', show_gap: '顯示間隔值', diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index f595ff9f22..dc7e0944a2 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -1700,6 +1700,9 @@ export default { value_formatter_value: '数值', value_formatter_percent: '百分比', value_formatter_unit: '数量单位', + value_formatter_unit_language: '单位语言', + value_formatter_unit_language_ch: '中文', + value_formatter_unit_language_en: '英文', value_formatter_decimal_count: '小数位数', value_formatter_suffix: '单位后缀', show_gap: '显示间隔值', diff --git a/core/core-frontend/src/models/chart/chart.d.ts b/core/core-frontend/src/models/chart/chart.d.ts index aef3385b16..bca4d0b0b3 100644 --- a/core/core-frontend/src/models/chart/chart.d.ts +++ b/core/core-frontend/src/models/chart/chart.d.ts @@ -100,6 +100,7 @@ declare interface BaseFormatter { /** * 单位换算 */ + unitLanguage: 'ch' | 'en' unit: number /** * 单位后缀 diff --git a/core/core-frontend/src/views/chart/components/editor/drag-item/components/ValueFormatterEdit.vue b/core/core-frontend/src/views/chart/components/editor/drag-item/components/ValueFormatterEdit.vue index b4d1166290..b317192ac3 100644 --- a/core/core-frontend/src/views/chart/components/editor/drag-item/components/ValueFormatterEdit.vue +++ b/core/core-frontend/src/views/chart/components/editor/drag-item/components/ValueFormatterEdit.vue @@ -1,7 +1,14 @@