我目前正在实现一个物料表来显示一些员工数据(在软件企业工作)。标头是显示当前数据的月份。也有过去的数据。现在,我想将水平滚动条设置为从特定的标题位置开始,以便可以向左和向右滚动。我该怎么办?
<table id="employeeTable" mat-table [dataSource]="assignedEmployeesDataSource" matSort matSortActive="name" matSortDirection="asc" matSortDisableClear>
<ng-container matColumnDef="capacitySum">
<th mat-header-cell class="text-align-right" *matHeaderCellDef mat-sort-header>{{_lang('columns.sum')}}</th>
<td mat-cell *matCellDef="let row" class="text-align-right table-warning font-weight-bold sum" >{{row.capacitySum | number : '1.1-1':'de' }}</td>
<td mat-footer-cell class="sum" *matFooterCellDef> {{ getTotalCapacitySum() | number : '1.1-1':'de' }} </td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="assignedEmployeesColumns; sticky:
true"></tr>
<tr mat-row [class.selected]="selectedAssignment === row" class="example-element-row" *matRowDef="let row; columns: assignedEmployeesColumns;" (click)="onSelectEmployee(row);"></tr>
<tr mat-footer-row class="table-warning font-weight-bold" *matFooterRowDef="assignedEmployeesColumns; sticky: !selectedAssignment"></tr>
</table>