gpt4 book ai didi

html - 如何使用角 Material 表添加多个标题行

转载 作者:行者123 更新时间:2023-12-03 15:13:55 24 4
gpt4 key购买 nike

参数 1:时间段
{{元素.值}}


参数 2:性别
{{元素.性别}}

<ng-container matColumnDef="column3">
<mat-header-cell *matHeaderCellDef rowspan="2"> Patients with Base Condition </mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.value}} </mat-cell>
</ng-container>

<ng-container matColumnDef="column4">
<mat-header-cell *matHeaderCellDef> Patients with Outcome</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.value}} </mat-cell>
</ng-container>

<ng-container matColumnDef="column5">
<mat-header-cell *matHeaderCellDef class="ColumnDivider"> Prevelance </mat-header-cell>
<mat-cell *matCellDef="let element" class="ColumnDivider"> {{element.value}} </mat-cell>
</ng-container>

<ng-container matColumnDef="column6">
<mat-header-cell *matHeaderCellDef> Patients at Risk </mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.value}} </mat-cell>
</ng-container>

<ng-container matColumnDef="column7">
<mat-header-cell *matHeaderCellDef> New Patients with Outcome </mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.value}} </mat-cell>
</ng-container>

<ng-container matColumnDef="column8">
<mat-header-cell *matHeaderCellDef class="ColumnDivider"> Incidence Proportion </mat-header-cell>
<mat-cell *matCellDef="let element" class="ColumnDivider"> {{element.value}} </mat-cell>
</ng-container>

<ng-container matColumnDef="column8">
<mat-header-cell *matHeaderCellDef> Total Patient Years at Risk </mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.value}} </mat-cell>
</ng-container>

<ng-container matColumnDef="column10">
<mat-header-cell *matHeaderCellDef class="myMarginLeft"> New Patients with Outcome </mat-header-cell>
<mat-cell *matCellDef="let element" class="myMarginLeft"> {{element.value}} </mat-cell>
</ng-container>

<ng-container matColumnDef="column11">
<mat-header-cell *matHeaderCellDef >Incidence Rate </mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.value}} </mat-cell>
</ng-container>

<ng-container *matHeaderRowDef="displayedColumns">
<div class="mat-header-row header-group-row">
<div class="mat-header-cell" role="columnheader"></div>
<div class="mat-header-cell" role="columnheader"></div>
</div>
<mat-header-row></mat-header-row>
</ng-container>
<mat-row *matRowDef="let row; columns: displayedColumns;" (click)="getRecord(row)" [ngClass]="{'highlight': selectedRowIndex == row.inp_analysis_name}"></mat-row>

多列与单列。

column1|column2|Column3|Column4|Column5|Column6|Column7|Column8
Column2.1|Column2.2|Column2.3 Column6.1|Column6.2

最佳答案

使用 colspan 重新创建多个标题行和单元格分组的示例。
https://stackblitz.com/edit/angular-bklajw?file=app%2Ftable-basic-example.html
enter image description here

关于html - 如何使用角 Material 表添加多个标题行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56724439/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com