addTreeDataIndex(tree, index = 0) {
return tree.map((item) => {
const newItem = { ...item, Index: index++ };
if (item.children) {
newItem.children = this.addTreeDataIndex(item.children, index);
}
return newItem;
});
},
el-tree 树形结构添加层级标识
猜你喜欢
转载自blog.csdn.net/weixin_53561783/article/details/130499314
今日推荐
周排行