美文网首页
table 合并单元格

table 合并单元格

作者: 晨曦Bai | 来源:发表于2020-09-23 16:06 被阅读0次

https://stackblitz.com/edit/angular-gevqvq?file=src%2Fapp%2Frow-span.component.css

分类合并的:
https://stackblitz.com/edit/angular-lnahlh?file=app%2Ftable-basic-example.ts

我要的:
https://stackoverflow.com/questions/53406725/dynamic-rowspan-in-angular?r=SearchResults

<table>
<ng-container *ngFor="let data of dataList">
<tr>
<td [attr.rowspan]="data.numbers.length">{{data.pname}}</td>
<td>{{data.numbers[0]}}</td>
</tr>
<ng-container *ngFor="let number of data.numbers; let i= index;">
<tr *ngIf="i!=0">
<td>{{number}}</td>
</tr>
</ng-container>
</ng-container>
</table>

相关文章

网友评论

      本文标题:table 合并单元格

      本文链接:https://www.haomeiwen.com/subject/gscoyktx.html