mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 11:32:57 +08:00
fix(图表): 修复表格自定义宽度下钻后下钻字段宽度改变
This commit is contained in:
parent
9fe10c02bd
commit
8d924c9507
@ -325,6 +325,18 @@ export function getStyle(chart: Chart): Style {
|
||||
p[n.fieldId] = n
|
||||
return p
|
||||
}, {}) || {}
|
||||
// 下钻字段使用入口字段的宽度
|
||||
if (chart.drill) {
|
||||
const { xAxis } = parseJson(chart)
|
||||
const curDrillField = chart.drillFields[chart.drillFilters.length]
|
||||
const drillEnterFieldIndex = xAxis.findIndex(
|
||||
item => item.id === chart.drillFilters[0].fieldId
|
||||
)
|
||||
const drillEnterField = xAxis[drillEnterFieldIndex]
|
||||
fieldMap[curDrillField.dataeaseName] = {
|
||||
width: fieldMap[drillEnterField.dataeaseName]?.width
|
||||
}
|
||||
}
|
||||
style.colCfg.width = node => {
|
||||
const width = node.spreadsheet.container.cfg.el.offsetWidth
|
||||
if (!basicStyle.tableFieldWidth?.length) {
|
||||
|
Loading…
Reference in New Issue
Block a user