0

in a mat 对话框在mat-table标题下方显示一行。有没有人遇到过这个问题,我该如何解决?

请参阅此图像以获取标题下方显示的行

下面是代码

<h2 mat-dialog-title>dialog title</h2>
<mat-dialog-content class="mat-typography">
    <div class="bottom-box">
        <!-- Add expansion panel here -->
        <table mat-table [dataSource]="data.dataSource" matSort>

            <ng-container matColumnDef="areaName">
                <th mat-header-cell *matHeaderCellDef mat-sort-header> column 1</th>
                <td mat-cell *matCellDef="let row "> test data </td>
            </ng-container>

            <ng-container matColumnDef="fixture">
                <th mat-header-cell *matHeaderCellDef> column 2 </th>
                <td mat-cell *matCellDef="let row "> {{ row.fValue }} </td>
            </ng-container>

            <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
            <tr mat-row *matRowDef="let row; columns: displayedColumns; "></tr>

            <!-- Row shown when there is no matching data. -->
            <tr class=" mat-row " *matNoDataRow>
                <td class="mat-cell " colspan=5>{{ noItemsFound }}</td>
            </tr>
        </table>
        <mat-paginator [pageSizeOptions]="[5, 10]"></mat-paginator>
    </div>
</mat-dialog-content>
<mat-dialog-actions align="end">
    <button mat-raised-button mat-dialog-close color="primary" (click)="onConfirmClick()">{{confirmText}}</button>
</mat-dialog-actions>
4

0 回答 0