fix(图表): 修复移动端表格第二层无法下钻 #16633 #16485

This commit is contained in:
wisonic
2025-08-12 15:36:58 +08:00
committed by wisonic-s
parent 34ae8385b2
commit ee93bbbddb
6 changed files with 20 additions and 5 deletions

View File

@@ -132,7 +132,8 @@ export class TableInfo extends S2ChartView<TableSheet> {
formatCfg = formatterItem
}
return valueFormatter(value, formatCfg)
}
},
id: ele.id
})
})
const { basicStyle, tableCell, tableHeader, tooltip } = parseJson(chart.customAttr)

View File

@@ -129,7 +129,8 @@ export class TableNormal extends S2ChartView<TableSheet> {
formatCfg = formatterItem
}
return valueFormatter(value, formatCfg)
}
},
id: ele.id
})
})
const { basicStyle, tableCell, tableHeader, tooltip } = parseJson(chart.customAttr)

View File

@@ -174,7 +174,8 @@ export class TablePivot extends S2ChartView<PivotSheet> {
} else {
return valueFormatter(value, formatterItem)
}
}
},
id: ele.id
})
})

View File

@@ -162,7 +162,14 @@ export abstract class S2ChartView<P extends SpreadSheet> extends AntVAbstractCha
this.showTooltip(s2Instance, event, meta)
}
}
touchAction(callback)
const cell = s2Instance.getCell(shape)
const cellMeta = cell?.getMeta()
let fieldId
if (cellMeta) {
const field = find(meta, item => item.field === cellMeta.valueField)
fieldId = field?.id
}
touchAction(callback, fieldId)
})
})
}

View File

@@ -370,7 +370,10 @@ const pointClickTrans = () => {
}
}
const touchAction = callback => {
const touchAction = (callback, fieldId) => {
if (fieldId) {
state.curActionId = fieldId
}
if (!trackMenu.value.length) {
callback?.()
}

View File

@@ -27,6 +27,8 @@ public class ChartViewFieldDTO extends ChartViewFieldBaseDTO implements Serializ
private boolean hide;
private String groupType;
/**
* 字段来源
*/