// 删除(使用递归)
const onDelete = (l,key) => {
// alert(l)
const index = l.findIndex((child) => child.menuId === key);
if (index !== -1) {
l.splice(index, 1);
} else {
l.forEach((child) => {
onDelete(child.children, key);
});
}
};

被折叠的 条评论
为什么被折叠?



