From 002cb841691c39ebef8e9f721cd6778800c3a42e Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Mon, 25 Dec 2023 15:06:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE-=E8=A1=A8=E6=A0=BC):=20?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=86=BB=E7=BB=93=E5=AD=97=E6=AE=B5=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/lang/en.js | 3 ++- core/frontend/src/lang/tw.js | 3 ++- core/frontend/src/lang/zh.js | 3 ++- .../frontend/src/views/chart/chart/table/table-info.js | 8 ++------ .../views/chart/components/shapeAttr/SizeSelector.vue | 5 +++++ .../chart/components/shapeAttr/SizeSelectorAntV.vue | 5 +++++ .../src/views/chart/components/table/TableNormal.vue | 10 ---------- 7 files changed, 18 insertions(+), 19 deletions(-) diff --git a/core/frontend/src/lang/en.js b/core/frontend/src/lang/en.js index e39f519e66..daa404f697 100644 --- a/core/frontend/src/lang/en.js +++ b/core/frontend/src/lang/en.js @@ -1594,7 +1594,8 @@ export default { gauge_axis_label: 'Axis Label', word_size_range: 'Word Size Range', word_spacing: 'Word Spacing', - axis_multi_select_tip: 'Hold down the Ctrl/Cmd or Shift key and click to select more than one' + axis_multi_select_tip: 'Hold down the Ctrl/Cmd or Shift key and click to select more than one', + needs_to_be_integer: 'Needs ti be an integer' }, dataset: { scope_edit: 'Effective only when editing', diff --git a/core/frontend/src/lang/tw.js b/core/frontend/src/lang/tw.js index 25111c4c8e..e3826ff7ea 100644 --- a/core/frontend/src/lang/tw.js +++ b/core/frontend/src/lang/tw.js @@ -1586,7 +1586,8 @@ export default { gauge_axis_label: '刻度標籤', word_size_range: '字號區間', word_spacing: '文字間隔', - axis_multi_select_tip: '按住 Ctrl/Cmd 鍵或者 Shift 鍵再點擊可多選' + axis_multi_select_tip: '按住 Ctrl/Cmd 鍵或者 Shift 鍵再點擊可多選', + needs_to_be_integer: '需要為整數' }, dataset: { scope_edit: '僅編輯時生效', diff --git a/core/frontend/src/lang/zh.js b/core/frontend/src/lang/zh.js index de6840c424..aa34dd927d 100644 --- a/core/frontend/src/lang/zh.js +++ b/core/frontend/src/lang/zh.js @@ -1586,7 +1586,8 @@ export default { gauge_axis_label: '刻度标签', word_size_range: '字号区间', word_spacing: '文字间隔', - axis_multi_select_tip: '按住 Ctrl/Cmd 键或者 Shift 键再点击可多选' + axis_multi_select_tip: '按住 Ctrl/Cmd 键或者 Shift 键再点击可多选', + needs_to_be_integer: '需要为整数' }, dataset: { scope_edit: '仅编辑时生效', diff --git a/core/frontend/src/views/chart/chart/table/table-info.js b/core/frontend/src/views/chart/chart/table/table-info.js index 960e8c9aff..40955fb143 100644 --- a/core/frontend/src/views/chart/chart/table/table-info.js +++ b/core/frontend/src/views/chart/chart/table/table-info.js @@ -121,9 +121,7 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo) } } s2Options.colCell = (node) => { - if (node.colIndex === 0) { - node.label = ' ' - } + node.label = ' ' } } @@ -312,9 +310,7 @@ export function baseTableNormal(s2, container, chart, action, tableData) { } } s2Options.colCell = (node) => { - if (node.colIndex === 0) { - node.label = ' ' - } + node.label = ' ' } } diff --git a/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue b/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue index d5e3742bda..2c98735ff0 100644 --- a/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue +++ b/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue @@ -1307,6 +1307,11 @@ export default { this.$message.error(this.$t('chart.max_more_than_mix')) return } + const reg = /^\d+$/m + if (!reg.test(this.sizeForm.tableColumnFreezeHead)) { + this.$message.error(this.$t('chart.table_freeze') + this.$t('chart.needs_to_be_integer')) + return + } this.$emit('onSizeChange', this.sizeForm) }, showProperty(property) { diff --git a/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue b/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue index 027c07b6cc..7d841773c8 100644 --- a/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue +++ b/core/frontend/src/views/chart/components/shapeAttr/SizeSelectorAntV.vue @@ -1782,6 +1782,11 @@ export default { this.$message.error(this.$t('chart.max_more_than_mix')) return } + const reg = /^\d+$/m + if (!reg.test(this.sizeForm.tableRowFreezeHead) || !reg.test(this.sizeForm.tableColumnFreezeHead)) { + this.$message.error(this.$t('chart.table_freeze') + this.$t('chart.needs_to_be_integer')) + return + } this.$emit('onSizeChange', this.sizeForm) }, showProperty(property) { diff --git a/core/frontend/src/views/chart/components/table/TableNormal.vue b/core/frontend/src/views/chart/components/table/TableNormal.vue index 7b3859a247..260bf2a107 100644 --- a/core/frontend/src/views/chart/components/table/TableNormal.vue +++ b/core/frontend/src/views/chart/components/table/TableNormal.vue @@ -478,16 +478,6 @@ export default { } } this.table_item_class_stripe = JSON.parse(JSON.stringify(this.table_item_class)) - // 暂不支持斑马纹 - // if (customAttr.color.tableStripe) { - // // this.table_item_class_stripe.background = hexColorToRGBA(customAttr.color.tableItemBgColor, customAttr.color.alpha - 40) - // if (this.chart.customStyle) { - // const customStyle = JSON.parse(this.chart.customStyle) - // if (customStyle.background) { - // this.table_item_class_stripe.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha) - // } - // } - // } if (customAttr.color.enableTableCrossBG) { this.table_item_class_stripe.background = hexColorToRGBA(customAttr.color.tableItemSubBgColor, customAttr.color.alpha) }