我是新手,我想为以下数据构建一个递归树形视图。我该怎么办?
parent = [ { 名称:“ xyz_center”, 选择:ClrSelectedState.INDETERMINATE, 子文件夹:[ { 名称:“ DS40G”, 选择:ClrSelectedState.INDETERMINATE, 子文件夹:[ { 名称:“ DS50F”, 选择:ClrSelectedState.UNSELECTED, 子文件夹:[ { 名称:“ DS50F1”, 已选择:ClrSelectedState.UNSELECTED }
],
stores: [
{
name: "DS1",
selected: ClrSelectedState.UNSELECTED
},
{
name: "DS61",
selected: ClrSelectedState.UNSELECTED
},
{
name: "DS71",
selected: ClrSelectedState.SELECTED
},
{
name: "DS81",
selected: ClrSelectedState.UNSELECTED
}
]
}
],
stores: [
{
name: "DS1",
selected: ClrSelectedState.UNSELECTED
},
{
name: "DS61",
selected: ClrSelectedState.UNSELECTED
},
{
name: "DS71",
selected: ClrSelectedState.SELECTED
},
{
name: "DS81",
selected: ClrSelectedState.UNSELECTED
}
]
}
],
stores: [
{
name: "DS1",
selected: ClrSelectedState.UNSELECTED
},
{
name: "DS61",
selected: ClrSelectedState.UNSELECTED
},
{
name: "DS71",
selected: ClrSelectedState.SELECTED
},
{
name: "DS81",
selected: ClrSelectedState.UNSELECTED
}
]
}
];