mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 01:14:50 +08:00
修复表格样式
This commit is contained in:
+5
-5
@@ -182,7 +182,7 @@ export function getTableScroll({
|
||||
}: { extraHeight?: number; id?: string } = {}) {
|
||||
if (typeof extraHeight == 'undefined') {
|
||||
// 默认底部分页64 + 边距10
|
||||
extraHeight = 80;
|
||||
extraHeight = 167;
|
||||
}
|
||||
let tHeader = null;
|
||||
if (id) {
|
||||
@@ -192,16 +192,16 @@ export function getTableScroll({
|
||||
.getElementsByClassName('ant-table-thead')[0]
|
||||
: null;
|
||||
} else {
|
||||
tHeader = document.getElementsByClassName('ant-table-thead')[0];
|
||||
tHeader = document.querySelector('.ant-pro-grid-content');
|
||||
}
|
||||
|
||||
//表格内容距离顶部的距离
|
||||
let tHeaderBottom = 0;
|
||||
let mainTop = 0;
|
||||
if (tHeader) {
|
||||
tHeaderBottom = tHeader.getBoundingClientRect().bottom;
|
||||
mainTop = tHeader.getBoundingClientRect().top;
|
||||
}
|
||||
|
||||
//窗体高度-表格内容顶部的高度-表格内容底部的高度
|
||||
let height = document.body.clientHeight - tHeaderBottom - extraHeight;
|
||||
let height = document.body.clientHeight - mainTop - extraHeight;
|
||||
return height;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user