调试菜单状态问题

This commit is contained in:
BianLzhaoMin 2025-02-19 14:40:43 +08:00
parent 8759bde930
commit ce23f8933e
1 changed files with 16 additions and 1 deletions

View File

@ -107,6 +107,9 @@
tr += "</tr>"
$("#dt-table").append(tr);
}
// 递归获取菜单状态
getIsCheckFun(data)
}
});
}
@ -143,6 +146,18 @@
$("#dt-table").treetable(option);
// 递归函数
function getIsCheckFun(list) {
if (list && list.length > 0) {
list.forEach((e) => {
if (e.isCheck === 1) {
console.log('有待审数据', e)
}
if (e.child && e.child.length > 0) {
getIsCheckFun(e.child)
}
})
}
}
</script>