|
|
|
@ -23,12 +23,11 @@ export class OilStationListComponent implements OnInit {
|
|
|
|
|
tableScrollHeight |
|
|
|
|
resizeListener |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' |
|
|
|
|
|
|
|
|
|
console.log('tableScrollHeight', this.tableScrollHeight) |
|
|
|
|
this.tableScrollHeight = '100px' |
|
|
|
|
// 页面监听
|
|
|
|
|
this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { |
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' |
|
|
|
|
let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight |
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 10) + 'px' |
|
|
|
|
}); |
|
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
|
name: [null] |
|
|
|
@ -143,6 +142,10 @@ export class OilStationListComponent implements OnInit {
|
|
|
|
|
this.list = [...this.list] |
|
|
|
|
this.tableSpin = false |
|
|
|
|
this.isLoading = false |
|
|
|
|
setTimeout(() => { |
|
|
|
|
let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight |
|
|
|
|
this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 10) + 'px' |
|
|
|
|
}, 0); |
|
|
|
|
resolve(data) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|