怎么用遞歸封裝下面的數(shù)據(jù)格式?{? ? text: "Parent 1",? ? nodes: [? ? ? {? ? ? ? text: "Child 1",? ? ? ? nodes: [? ? ? ? ? {? ? ? ? ? ? text: "Grandchild 1"? ? ? ? ? },? ? ? ? ? {? ? ? ? ? ? text: "Grandchild 2"? ? ? ? ? }? ? ? ? ]? ? ? },? ? ? {? ? ? ? text: "Child 2",? ? ? ? nodes: [? ? ? ? ? {? ? ? ? ? ? text: "Grandchild 1"? ? ? ? ? },? ? ? ? ? {? ? ? ? ? ? text: "Grandchild 2"? ? ? ? ? }? ? ? ? ]? ? ? }? ? ]? },? {? ? text: "Parent 2"? },? {? ? text: "Parent 3"? },? {? ? text: "Parent 4"? },? {? ? text: "Parent 5"? }];
treeview的數(shù)據(jù)格式問(wèn)題
慕斯卡6635957
2017-03-14 15:55:40