mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:48:13 +08:00
fix: 修复超级表头列固定位置问题
This commit is contained in:
parent
882354fb02
commit
820df77433
@ -1129,9 +1129,18 @@ export default class Table extends React.Component<TableProps, object> {
|
||||
// 自动将 table-layout: auto 改成 fixed
|
||||
if (!store.columnWidthReady) {
|
||||
const cx = this.props.classnames;
|
||||
const ths: HTMLTableCellElement[] = [].slice.call(
|
||||
table.querySelectorAll('thead>tr:last-child>th[data-index]')
|
||||
);
|
||||
const ths = (
|
||||
[].slice.call(
|
||||
table.querySelectorAll('thead>tr>th[data-index]')
|
||||
) as HTMLTableCellElement[]
|
||||
).filter((th, index, arr) => {
|
||||
return (
|
||||
arr.findIndex(
|
||||
item =>
|
||||
item.getAttribute('data-index') === th.getAttribute('data-index')
|
||||
) === index
|
||||
);
|
||||
});
|
||||
|
||||
const div = document.createElement('div');
|
||||
div.className = 'amis-scope'; // jssdk 里面 css 会在这一层
|
||||
|
Loading…
Reference in New Issue
Block a user