Skip to content

Commit

Permalink
修复 Table 在表头有分组的情况下,固定列样式有些问题
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed May 14, 2020
1 parent c5af45f commit 3b2be69
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/store/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ export const TableStore = iRendererStore
item.type === '__expandme'
? false
: (item.toggled || !item.toggable) &&
(self.footable && item.breakpoint && isBreakpoint(item.breakpoint))
self.footable &&
item.breakpoint &&
isBreakpoint(item.breakpoint)
);
}

Expand Down Expand Up @@ -327,6 +329,7 @@ export const TableStore = iRendererStore
label: string;
index: number;
colSpan: number;
has: Array<any>;
}> {
const columsn = getFilteredColumns();
const len = columsn.length;
Expand All @@ -339,11 +342,13 @@ export const TableStore = iRendererStore
label: string;
index: number;
colSpan: number;
has: Array<any>;
}> = [
{
label: columsn[0].groupName,
colSpan: 1,
index: columsn[0].index
index: columsn[0].index,
has: [columsn[0]]
}
];

Expand All @@ -358,11 +363,13 @@ export const TableStore = iRendererStore

if (current.groupName === prev.label) {
prev.colSpan++;
prev.has.push(current);
} else {
result.push({
label: current.groupName,
colSpan: 1,
index: current.index
index: current.index,
has: [current]
});
}
}
Expand Down

0 comments on commit 3b2be69

Please sign in to comment.