fix: 修复CRUD固定表头不生效问题 (#8332)

* fix: 修复固定表头不生效

* 修复低版本浏览器固定表头不生效问题

---------

Co-authored-by: huangxj29 <huangxuejuan@xgd.com>
This commit is contained in:
huangxj29 2023-10-11 14:08:03 +08:00 committed by GitHub
parent 419bb28210
commit 6119616055
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1146,12 +1146,12 @@ export const TableStore = iRendererStore
return;
}
const cols = [].slice.call(
table.querySelectorAll(':scope>colgroup>col[data-index]')!
table.querySelectorAll(':scope>thead>tr>th[data-index]')
);
cols.forEach((col: HTMLElement) => {
const index = parseInt(col.getAttribute('data-index')!, 10);
const column = self.columns[index];
column.setRealWidth(col.clientWidth);
column.setRealWidth(col.offsetWidth);
});
}

View File

@ -46,6 +46,10 @@
position: absolute;
}
}
.#{$ns}Table-table {
table-layout: fixed;
}
}
&-heading {