mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
refactor(图表): 明细表表头未设置分组不显示已设置 (#15326)
This commit is contained in:
@@ -1312,4 +1312,4 @@ declare interface ColumnNode {
|
||||
children?: Columns
|
||||
}
|
||||
|
||||
declare type Columns = Array<string | ColumnNode>
|
||||
declare type Columns = Array<ColumnNode>
|
||||
|
||||
@@ -74,7 +74,7 @@ const init = () => {
|
||||
}
|
||||
if (headerGroupConfig?.columns?.length) {
|
||||
const allAxis = showColumns.map(item => item.key)
|
||||
const leafNodes = getLeafNodes(headerGroupConfig.columns as Array<ColumnNode>)
|
||||
const leafNodes = getLeafNodes(headerGroupConfig.columns)
|
||||
const leafKeys = leafNodes.map(item => item.key)
|
||||
if (!isEqual(allAxis, leafKeys)) {
|
||||
const { columns, meta } = headerGroupConfig
|
||||
|
||||
@@ -92,6 +92,10 @@ const groupConfigValid = computed(() => {
|
||||
if (!columns?.length) {
|
||||
return false
|
||||
}
|
||||
const noGroup = columns.every(item => !item.children?.length)
|
||||
if (noGroup) {
|
||||
return false
|
||||
}
|
||||
const xAxis = props.chart.xAxis
|
||||
const showColumns = []
|
||||
xAxis?.forEach(axis => {
|
||||
|
||||
Reference in New Issue
Block a user