获取角色的菜单树添加null判断

This commit is contained in:
吴季分
2025-10-14 13:55:50 +08:00
parent defbb3815d
commit 3aad6e1718

View File

@@ -243,7 +243,7 @@ export default {
getRoleMenu(roleId)
.then(response => {
const nodes = response.content.content
if (nodes.length === 0) {
if (nodes === null || nodes.length === 0) {
this.defaultCheckedKeys = []
this.$refs.menuTreeRef.setCheckedKeys([])
return