diff --git a/core/frontend/src/lang/en.js b/core/frontend/src/lang/en.js index 394a9ca95c..5b1f241620 100644 --- a/core/frontend/src/lang/en.js +++ b/core/frontend/src/lang/en.js @@ -1149,6 +1149,7 @@ export default { table_header_font_color: 'Header Font', table_item_font_color: 'Table Font', table_show_index: 'Show Index', + table_show_table_header: 'Show Table Header', stripe: 'Zebra pattern', start_angle: 'Start Angle', end_angle: 'End Angle', diff --git a/core/frontend/src/lang/tw.js b/core/frontend/src/lang/tw.js index da2374679d..c4f26a9eea 100644 --- a/core/frontend/src/lang/tw.js +++ b/core/frontend/src/lang/tw.js @@ -1148,6 +1148,7 @@ export default { table_header_font_color: '表頭字體', table_item_font_color: '表格字體', table_show_index: '顯示序號', + table_show_table_header: '顯示表頭', stripe: '斑馬紋', start_angle: '起始角度', end_angle: '結束角度', diff --git a/core/frontend/src/lang/zh.js b/core/frontend/src/lang/zh.js index 6f002f1ade..ad3f92132e 100644 --- a/core/frontend/src/lang/zh.js +++ b/core/frontend/src/lang/zh.js @@ -1147,6 +1147,7 @@ export default { table_header_font_color: '表头字体', table_item_font_color: '表格字体', table_show_index: '显示序号', + table_show_table_header: '显示表头', stripe: '斑马纹', start_angle: '起始角度', end_angle: '结束角度', diff --git a/core/frontend/src/views/chart/chart/chart.js b/core/frontend/src/views/chart/chart/chart.js index a687a7aafe..2058b8a829 100644 --- a/core/frontend/src/views/chart/chart/chart.js +++ b/core/frontend/src/views/chart/chart/chart.js @@ -156,7 +156,8 @@ export const DEFAULT_SIZE = { mapLineAnimateInterval: 1, mapLineAnimateTrailLength: 1, wordSizeRange: [8, 32], - wordSpacing: 6 + wordSpacing: 6, + showTableHeader: true } export const DEFAULT_SUSPENSION = { show: true 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 8f7179089f..2c9b8edd21 100644 --- a/core/frontend/src/views/chart/chart/table/table-info.js +++ b/core/frontend/src/views/chart/chart/table/table-info.js @@ -111,6 +111,15 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo) return new DataCell(viewMeta, viewMeta?.spreadsheet) } } + // 隐藏表头,保留顶部的分割线, 禁用表头横向 resize + if (customAttr.size.showTableHeader === false) { + s2Options.style.colCfg.height = 1 + s2Options.interaction = { + resize: { + colCellVertical: false + } + } + } // 开始渲染 if (s2) { @@ -284,6 +293,15 @@ export function baseTableNormal(s2, container, chart, action, tableData) { } } } + // 隐藏表头,保留顶部的分割线, 禁用表头横向 resize + if (customAttr.size.showTableHeader === false) { + s2Options.style.colCfg.height = 1 + s2Options.interaction = { + resize: { + colCellVertical: false + } + } + } // 开始渲染 if (s2) { diff --git a/core/frontend/src/views/chart/chart/util.js b/core/frontend/src/views/chart/chart/util.js index 92a9757112..347dbd41c2 100644 --- a/core/frontend/src/views/chart/chart/util.js +++ b/core/frontend/src/views/chart/chart/util.js @@ -63,7 +63,8 @@ export const TYPE_CONFIGS = [ 'tableColumnMode', 'showIndex', 'indexLabel', - 'tableColTooltip' + 'tableColTooltip', + 'showTableHeader' ], 'title-selector-ant-v': [ 'show', @@ -113,7 +114,8 @@ export const TYPE_CONFIGS = [ 'tableColumnMode', 'showIndex', 'indexLabel', - 'tableColTooltip' + 'tableColTooltip', + 'showTableHeader' ], 'title-selector-ant-v': [ 'show', @@ -1987,7 +1989,8 @@ export const TYPE_CONFIGS = [ 'tableColumnWidth', 'showIndex', 'indexLabel', - 'tableAutoBreakLine' + 'tableAutoBreakLine', + 'showTableHeader' ], 'title-selector': [ 'show', @@ -2031,7 +2034,8 @@ export const TYPE_CONFIGS = [ 'tableColumnWidth', 'showIndex', 'indexLabel', - 'tableAutoBreakLine' + 'tableAutoBreakLine', + 'showTableHeader' ], 'title-selector': [ 'show', diff --git a/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue b/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue index bfaa06d0ec..ca4a384770 100644 --- a/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue +++ b/core/frontend/src/views/chart/components/shapeAttr/SizeSelector.vue @@ -242,7 +242,42 @@ - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + {{ $t('commons.yes') }} + {{ $t('commons.no') }} + + +
+ + + + + + + + + +
@@ -1055,6 +1072,7 @@