多级数组树状菜单
let rootList = [
{id: 1, parent: null,text: "1"},
{id: 11, parent: 1,text: "1-1"},
{id: 12, parent: 1,text: "1-2"},
{id: 2, parent: null,text: "2"},
{id: 21, parent: 2,text: "2-1"},
]
function getTreeList(rootList, id, list){
for(let item of rootLis
原创
2021-11-23 10:57:55 ·
84 阅读 ·
0 评论