我正在使用 perfect-scrollbar (完美滚动条),并且还想使用 infiniteScroll ,但无法正常工作。
<perfect-scrollbar style="max-height: 300px;" fxFlex="auto">
<ng-container *ngFor="let search of SearchData; let i = index;">
<div class="single-result media">
<div class="avatarimg1">
<img [src]="search.profile_thumbnail_url" defaultCompany />
</div>
<div class="media-body row">
<div class="content col-md-8">
<a [routerLink]="['/application/company/company_profile']" [queryParams]="{ id:search.row_id}"
(click)="removeSearchResult()">
<h4 class="text-capitalize" style="color: #83131a;">{{search.account_name}} </h4>
</a>
<p *ngIf="search.sector_name">{{search.sector_name}}/{{search.industry_name}}</p>
</div>
<div class="col-md-4 text-right">
<span class="button-section">
<a class="btn module_name">{{search.module_display}}</a>
</span>
</div>
</div>
</div>
</ng-container>
<div class="company-item" data-infinite-scroll debounce [infiniteScrollDistance]="scrollDistance"
[infiniteScrollUpDistance]="scrollUpDistance" [infiniteScrollThrottle]="throttle" (scrolled)="onScrollDown()">
</div>
</perfect-scrollbar>
使用此代码,它可用于外部滚动,而不适用于完美滚动条