mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 12:29:24 +08:00
修复 Tables fixed 不对齐的问题
This commit is contained in:
parent
aa05989424
commit
51b631f62d
@ -502,11 +502,11 @@ export default class Table extends React.Component<TableProps, object> {
|
||||
} = (this.heights = {});
|
||||
forEach(table.querySelectorAll('thead>tr:last-child>th'), (item: HTMLElement) => {
|
||||
heights.header || (heights.header = item.offsetHeight);
|
||||
widths[item.getAttribute('data-index') as string] = item.clientWidth;
|
||||
widths[item.getAttribute('data-index') as string] = item.offsetWidth;
|
||||
});
|
||||
forEach(
|
||||
table.querySelectorAll('tbody>tr>*:last-child'),
|
||||
(item: HTMLElement, index: number) => (heights[index] = item.clientHeight)
|
||||
(item: HTMLElement, index: number) => (heights[index] = item.offsetHeight)
|
||||
);
|
||||
|
||||
// 让 react 去更新非常慢,还是手动更新吧。
|
||||
|
Loading…
Reference in New Issue
Block a user