使用角度为 8 的角度材料垫表的动态行跨度

时间:2021-07-22 17:47:47

标签: angular angular-material angular-material-table angular-material-7

我有如下数据,我想通过城市分组在 mat-table 中使用

arr = [{
{id: 1, status: 'active', name: 'AAA', city: 'cityA'},
{id: 2, status: 'active', name: 'AAA', city: 'cityA'},
{id: 3, status: 'active', name: 'AAA', city: 'cityA'},
{id: 4, status: 'active', name: 'AAA', city: 'cityB'},
{id: 5, status: 'active', name: 'AAA', city: 'cityB'},
{id: 6, status: 'active', name: 'AAA', city: 'cityB'},
{id: 7, status: 'active', name: 'AAA', city: 'cityC'},
{id: 8, status: 'active', name: 'AAA', city: 'cityC'},
{id: 9, status: 'active', name: 'AAA', city: 'cityC'},
}]

预期产出

enter image description here

0 个答案:

没有答案