【发布时间】:2021-12-16 20:59:15
【问题描述】:
我需要将年份中相同的单元格合并为一个单元格,在该单元格下根据相应的年份排列月份。我尝试获取年份计数并将其用作 colspan 值,但它不起作用
<thead>
<tr>
<th *ngFor="let colItem of YearGrid">{{colItem.Year}}</th>
</tr>
<tr>
<th *ngFor="let colItem of YearGrid">{{colItem.Month}}</th>
</tr>
</thead>
YearGrid = [
{Month: 'Nov', Year: 2020},
{Month: 'Dec', Year: 2020},
{Month: 'Jan', Year: 2021},
{Month: 'Feb', Year: 2021},
{Month: 'Mar', Year: 2021}
];
【问题讨论】:
标签: javascript html css angular