如何实现具有不同子级标题的primeng树表?我正在使用 angular 7 和 primeng V7 数据如下:
{
"label":"Parent 1",
"data":{
"name":"Parent 1"
},
"children": this.resultData1
},
{
"label":"Parent 2",
"data":{
"name":"Parent 2"
},
"children": this.resultData2
}
子元素是
resultData1 : Array<any> = [
{data:{"status":"OK","AppId":"dsil1","GenId":"123"}},
{data:{"status":"OK","AppId":"dsil2","GenId":"124"}},
{data:{"status":"OK","AppId":"dsil3","GenId":"125"}},
{data:{"status":"OK","AppId":"dsil4","GenId":"126"}}
]
resultData2 : Array<any> = [
{data:{"ID":"123","print":"NO","execTime":"02-16-2020"}},
{data:{"ID":"124","print":"NO","execTime":"02-14-2020"}},
{data:{"ID":"125","print":"YES","execTime":"01-16-2020"}},
{data:{"ID":"126","print":"YES","execTime":"12-11-2019"}}
]