// 删除(使用递归)
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);
});
}
};