fix(图表): 修复表格移动端无法关闭提示 #15953

This commit is contained in:
wisonic-s
2025-04-27 14:38:42 +08:00
committed by GitHub
parent 85bef460ab
commit 4fdb46f7fe
9 changed files with 18 additions and 16 deletions

View File

@@ -2090,7 +2090,8 @@ export default {
quota_position_row: 'Row',
quota_col_label: 'Quota Column Label',
table_grand_total_label: 'Total Alias',
table_field_total_label: 'Field Alias'
table_field_total_label: 'Field Alias',
table_row_header_freeze: 'Row Header Freeze'
},
dataset: {
field_value: 'Field Value',

View File

@@ -2031,7 +2031,8 @@ export default {
quota_position_row: '行頭展示',
quota_col_label: '指標列名',
table_grand_total_label: '總計別名',
table_field_total_label: '字段別名'
table_field_total_label: '字段別名',
table_row_header_freeze: '行頭凍結'
},
dataset: {
field_value: '欄位值',

View File

@@ -2037,7 +2037,8 @@ export default {
quota_position_row: '行头展示',
quota_col_label: '指标列名',
table_grand_total_label: '总计别名',
table_field_total_label: '字段别名'
table_field_total_label: '字段别名',
table_row_header_freeze: '行头冻结'
},
dataset: {
field_value: '字段值',
@@ -3177,7 +3178,6 @@ export default {
space_left: '左',
space_width: '宽',
space_height: '高',
to_top: '置顶',
down: '下载',
mobile_style_setting: '样式设置',
mobile_style_setting_tips: '自定义移动端背景',

View File

@@ -485,6 +485,10 @@ declare interface ChartTableHeaderAttr {
name: string
}[]
}
/**
* 透视表行头冻结
*/
rowHeaderFreeze: boolean
}
/**
* 单元格属性

View File

@@ -489,12 +489,7 @@ watch(
@onLabelChange="onLabelChange"
/>
</collapse-switch-item>
<!-- tooltip 为鼠标悬停 移动端table看不到效果 不再单独配置 -->
<collapse-switch-item
v-if="
showProperties('tooltip-selector') &&
(!mobileInPc || (mobileInPc && chart.type.indexOf('table') === -1))
"
v-model="chart.customAttr.tooltip.show"
:themes="themes"
:change-model="chart.customAttr.tooltip"

View File

@@ -479,7 +479,8 @@ export const DEFAULT_TABLE_HEADER: ChartTableHeaderAttr = {
headerGroupConfig: {
columns: [],
meta: []
}
},
rowHeaderFreeze: true
}
export const DEFAULT_TABLE_CELL: ChartTableCellAttr = {
tableFontColor: '#000000',

View File

@@ -368,13 +368,13 @@ export class TableInfo extends S2ChartView<TableSheet> {
newChart.on(S2Event.COL_CELL_HOVER, event => this.showTooltip(newChart, event, meta))
newChart.on(S2Event.DATA_CELL_HOVER, event => this.showTooltip(newChart, event, meta))
newChart.on(S2Event.MERGED_CELLS_HOVER, event => this.showTooltip(newChart, event, meta))
// touch
this.configTouchEvent(newChart, drawOption, meta)
}
// header resize
newChart.on(S2Event.LAYOUT_RESIZE_COL_WIDTH, ev => resizeAction(ev))
// right click
newChart.on(S2Event.GLOBAL_CONTEXT_MENU, event => copyContent(newChart, event, meta))
// touch
this.configTouchEvent(newChart, drawOption, meta)
// theme
const customTheme = this.configTheme(chart)
newChart.setThemeCfg({ theme: customTheme })

View File

@@ -269,13 +269,13 @@ export class TableNormal extends S2ChartView<TableSheet> {
if (show) {
newChart.on(S2Event.COL_CELL_HOVER, event => this.showTooltip(newChart, event, meta))
newChart.on(S2Event.DATA_CELL_HOVER, event => this.showTooltip(newChart, event, meta))
// touch
this.configTouchEvent(newChart, drawOption, meta)
}
// header resize
newChart.on(S2Event.LAYOUT_RESIZE_COL_WIDTH, ev => resizeAction(ev))
// right click
newChart.on(S2Event.GLOBAL_CONTEXT_MENU, event => copyContent(newChart, event, meta))
// touch
this.configTouchEvent(newChart, drawOption, meta)
// theme
const customTheme = this.configTheme(chart)
newChart.setThemeCfg({ theme: customTheme })

View File

@@ -585,6 +585,8 @@ export class TablePivot extends S2ChartView<PivotSheet> {
s2.on(S2Event.COL_CELL_HOVER, event => this.showTooltip(s2, event, meta))
s2.on(S2Event.ROW_CELL_HOVER, event => this.showTooltip(s2, event, meta))
s2.on(S2Event.DATA_CELL_HOVER, event => this.showTooltip(s2, event, meta))
// touch
this.configTouchEvent(s2, drawOption, meta)
}
// empty data tip
configEmptyDataStyle(s2, newData)
@@ -594,8 +596,6 @@ export class TablePivot extends S2ChartView<PivotSheet> {
s2.on(S2Event.COL_CELL_CLICK, ev => this.headerCellClickAction(chart, ev, s2, action))
// right click
s2.on(S2Event.GLOBAL_CONTEXT_MENU, event => copyContent(s2, event, meta))
// touch
this.configTouchEvent(s2, drawOption, meta)
// theme
const customTheme = this.configTheme(chart)
s2.setThemeCfg({ theme: customTheme })