feat: 新增第二种按钮权限指令(根据登录接口返回的permissions字段进行判断) (#1177)

* feat: 新增第二种按钮权限指令(根据登录接口返回的`permissions`字段进行判断)
This commit is contained in:
xiaoming
2024-08-12 13:32:04 +08:00
committed by GitHub
parent 96152ed134
commit 244ab7f990
20 changed files with 361 additions and 22 deletions

View File

@@ -355,7 +355,7 @@ function getAuths(): Array<string> {
return router.currentRoute.value.meta.auths as Array<string>;
}
/** 是否有按钮级别的权限 */
/** 是否有按钮级别的权限(根据路由`meta`中的`auths`字段进行判断)*/
function hasAuth(value: string | Array<string>): boolean {
if (!value) return false;
/** 从当前路由的`meta`字段里获取按钮级别的所有自定义`code`值 */