问题描述
我在Angular材质扩展面板中遇到此问题。分页下拉菜单的一部分被切除。如何使下拉菜单与扩展面板的末端重叠?我尝试z-index
无济于事。
材质手风琴内部有三个面板。
以下是相关代码:
<mat-accordion class="example-headers-align" multi>
<mat-expansion-panel hideToggle>
<mat-expansion-panel-header>
<mat-panel-title>
Title
</mat-panel-title>
</mat-expansion-panel-header>
<p-table
#dt
[columns]="cols"
[value]="tableDataSummary"
[paginator]="false"
scrollable="true"
sortMode="multiple"
[resizableColumns]="true"
[rowHover]="true"
[rows]="10"
scrollable="true"
resizableColumns="true"
[rowsPerPageOptions]="[10,100]"
appendTo="body"
[paginator]="true"
>
<ng-template pTemplate="header" let-columns>
<tr>
<th pSortableColumn="col" *ngFor="let col of columns">
{{col.header}}
</th>
</tr>
<tr>
<th
*ngFor="let col of columns"
[ngSwitch]="col.field"
[pSortableColumn]="col.field"
>
<p-sortIcon [field]="'col.field'"></p-sortIcon>
</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowData let-columns="columns">
<tr [pSelectableRow]="rowData">
<td
*ngFor="let col of columns"
style="line-break: anywhere;"
>
<span
*ngIf="col.field === 'TR' || col.field === 'TwR' || col.field === 'FT'; else elseBlock"
[ngClass]="rowData[col.field] > 0.10 ? 'red' : null"
>
{{ rowData[col.field] | percent:'1.0-2' }}
</span>
<ng-template #elseBlock>
{{ rowData[col.field] }}
</ng-template>
</td>
</tr>
</ng-template>
<ng-template pTemplate="paginatorleft" let-state>
Showing {{(state.page * state.rows) + 1}} to {{state.rows *
(state.page + 1)}} of {{state.totalRecords}}
</ng-template>
</p-table>
</mat-expansion-panel>
谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)