Add tool category management page

This commit is contained in:
2024-01-18 14:13:53 +08:00
parent b738634eff
commit c460e2c4cf
12 changed files with 482 additions and 55 deletions

View File

@@ -253,7 +253,14 @@ export const getPermissionPath = (): string[] => {
}
export const hasPathPermission = (path: string) => {
return getPermissionPath().indexOf(path) !== -1
let flag = false
getPermissionPath().forEach((value) => {
if (RegExp(value).test(path)) {
flag = true
return
}
})
return flag
}
export const getPermission = (): string[] => {