This commit is contained in:
Taric Xin
2022-04-25 10:29:41 +08:00
parent b8415bbac5
commit ca11cf85f4
18 changed files with 507 additions and 889 deletions

View File

@ -60,13 +60,29 @@ export class BasicTableComponent implements AfterViewInit, OnDestroy {
const header = document.getElementsByTagName('layout-pro-header')?.[0];
if (windowHeight && header) {
let scrollY = windowHeight - header.clientHeight - 35 - 49;
// 剔除页头高度
const headerWrapper = document.getElementsByTagName('page-header-wrapper')?.[0];
if (headerWrapper) {
scrollY -= headerWrapper.clientHeight;
}
const tabset = document.getElementsByTagName('nz-tabset')?.[0];
// 计算所有tabs高度
const tabset = document.getElementsByTagName('nz-tabset');
let tabsetHeight = 0;
for (let index = 0; index < tabset.length; index++) {
tabsetHeight += tabset[index].clientHeight;
}
if (tabset) {
scrollY -= tabset.clientHeight;
scrollY -= tabsetHeight;
}
// 剔除高度容器
// 计算所有tabs高度
const headerBox = document.getElementsByClassName('header_box');
let headerBoxHeight = 0;
for (let index = 0; index < headerBox.length; index++) {
headerBoxHeight += headerBox[index].clientHeight;
}
if (headerBox) {
scrollY -= headerBoxHeight;
}
this.scrollY = scrollY + 'px';
}