[代码优化](v2.6):角色管理选择菜单Bug修复

This commit is contained in:
ZhengJie
2020-11-16 18:29:43 +08:00
parent c9a8b708bb
commit e2bc51c7d6

View File

@@ -240,7 +240,10 @@ export default {
} }
} else { } else {
for (let i = 0; i < childIds.length; i++) { for (let i = 0; i < childIds.length; i++) {
this.menuIds.push(childIds[i]) const index = this.menuIds.indexOf(childIds[i])
if (index === -1) {
this.menuIds.push(childIds[i])
}
} }
} }
this.$refs.menu.setCheckedKeys(this.menuIds) this.$refs.menu.setCheckedKeys(this.menuIds)