角色可切换选项不足时不显示切换角色按钮

uat_us
wangxiaoshuang 2025-01-21 17:12:33 +08:00
parent e56440634e
commit e3f6f9107d
1 changed files with 5 additions and 1 deletions

View File

@ -146,7 +146,11 @@ export default {
return this.$store.state.user.roles
},
hasRole() {
return this.roles && this.roles.length > 1
return (
this.roles &&
this.roles.length > 1 &&
this.roles.filter((item) => !item.IsUserRoleDisabled).length > 1
)
},
},
watch: {