mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-14 23:12:51 +00:00
解决部门列表删除按钮不显示问题
This commit is contained in:
parent
2477a44ee5
commit
e2470a31bf
@ -244,13 +244,15 @@ export function revDeepTree(list: any[]) {
|
||||
const arr: any[] = [];
|
||||
let id = 0;
|
||||
|
||||
function deep(list: any[], parentId: any) {
|
||||
function deep(list: any[], parentId: number) {
|
||||
list.forEach((e) => {
|
||||
if (!e.id) {
|
||||
e.id = id++;
|
||||
}
|
||||
|
||||
e.parentId = parentId;
|
||||
if (!e.parentId) {
|
||||
e.parentId = parentId;
|
||||
}
|
||||
|
||||
arr.push(e);
|
||||
|
||||
@ -260,7 +262,7 @@ export function revDeepTree(list: any[]) {
|
||||
});
|
||||
}
|
||||
|
||||
deep(list || [], null);
|
||||
deep(list || [], 0);
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user