fix(图表): 修复明细表显示总计后,自动换行失效的问题
This commit is contained in:
parent
0b537a4fc8
commit
cc2eba6cf5
@ -264,14 +264,16 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
||||
ev.colsHierarchy.height = maxHeight
|
||||
newChart.store.set('autoCalcHeight', undefined)
|
||||
} else {
|
||||
const { value, width } = ev.colLeafNodes[0]
|
||||
calculateHeaderHeight(
|
||||
{ info: { meta: { value }, resizedWidth: width } },
|
||||
newChart,
|
||||
tableHeader,
|
||||
basicStyle,
|
||||
ev
|
||||
)
|
||||
if (ev.colLeafNodes?.length) {
|
||||
const { value, width } = ev.colLeafNodes[0]
|
||||
calculateHeaderHeight(
|
||||
{ info: { meta: { value }, resizedWidth: width } },
|
||||
newChart,
|
||||
tableHeader,
|
||||
basicStyle,
|
||||
ev
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -1793,6 +1793,9 @@ export const configSummaryRow = (chart, s2Options, newData, tableHeader, basicSt
|
||||
)
|
||||
newData.push(summaryObj)
|
||||
s2Options.dataCell = viewMeta => {
|
||||
// 配置文本自动换行参数
|
||||
viewMeta.autoWrap = basicStyle.autoWrap
|
||||
viewMeta.maxLines = basicStyle.maxLines
|
||||
if (viewMeta.rowIndex !== newData.length - 1) {
|
||||
return new CustomDataCell(viewMeta, viewMeta.spreadsheet)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user