fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`)asHTMLCanvasElement,'scroll').pipe(debounceTime(100)).subscribe((event: any)=>{//监听 DOM 滚动事件
fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`)asHTMLCanvasElement,'scroll').pipe(debounceTime(100)).subscribe((event: any)=>{//监听 DOM 滚动事件
@ -34,6 +34,9 @@ export class OilStationListComponent implements OnInit {
this.tableSpin=true
this.tableSpin=true
}
}
ngOnDestroy():void{
this.resizeListener.unsubscribe()
}
ngAfterViewInit():void{
ngAfterViewInit():void{
fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`)asHTMLCanvasElement,'scroll').pipe(debounceTime(100)).subscribe(async(event: any)=>{//监听 DOM 滚动事件
fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`)asHTMLCanvasElement,'scroll').pipe(debounceTime(100)).subscribe(async(event: any)=>{//监听 DOM 滚动事件