This commit is contained in:
Taric Xin
2022-04-25 11:32:16 +08:00
parent db6231925e
commit c3280283d6
9 changed files with 194 additions and 204 deletions

View File

@ -15,6 +15,8 @@ export class BasicTableComponent implements AfterViewInit, OnDestroy {
drawer: Subscription[] = [];
schema: SFSchema = {};
deviationHeight = 0;
constructor(public searchDrawerService: SearchDrawerService) {}
ngAfterViewInit(): void {
@ -66,11 +68,12 @@ export class BasicTableComponent implements AfterViewInit, OnDestroy {
scrollY -= headerWrapper.clientHeight;
}
// 计算所有tabs高度
const tabset = document.getElementsByTagName('nz-tabset');
const tabset = document.getElementsByTagName('nz-tabs-nav');
let tabsetHeight = 0;
for (let index = 0; index < tabset.length; index++) {
tabsetHeight += tabset[index].clientHeight;
}
console.log('tabsetHeight', tabsetHeight);
if (tabset) {
scrollY -= tabsetHeight;
}
@ -81,9 +84,14 @@ export class BasicTableComponent implements AfterViewInit, OnDestroy {
for (let index = 0; index < headerBox.length; index++) {
headerBoxHeight += headerBox[index].clientHeight;
}
console.log('headerBoxHeight', headerBoxHeight);
if (headerBox) {
scrollY -= headerBoxHeight;
}
if (typeof this.deviationHeight === 'number') {
scrollY -= this.deviationHeight;
}
this.scrollY = scrollY + 'px';
}
}

View File

@ -42,12 +42,13 @@
}
}
.header_box {
display : flex;
align-items : center;
justify-content: space-between;
min-height : 47px;
}
.double_tabset_box {
margin : -24px -24px 0;
background: #ffffff;
.tab_header {
.page_title {
font-weight: bold;
font-size : 17px;
@ -59,6 +60,13 @@
}
}
}
.header_tab {
nz-tabs-nav {
margin-bottom: 0;
}
}
}
.ant-table-pagination.ant-pagination {
@ -105,4 +113,23 @@
line-height: 21px;
}
}
}
.header_box {
display : flex;
align-items : center;
justify-content: space-between;
min-height : 47px;
.page_title {
font-weight: bold;
font-size : 17px;
.driver {
color : #ff4d4f;
margin-left : 17px;
margin-right: 6px;
}
}
}