src/directives/permission/hasRole.ts
@@ -7,8 +7,9 @@ app.directive('hasRole', (el, binding) => { const { wsCache } = useCache() const { value } = binding const super_admin = 'admin' const roles = wsCache.get(CACHE_KEY.USER).roles const super_admin = 'super_admin' const userInfo = wsCache.get(CACHE_KEY.USER) const roles = userInfo?.roles || [] if (value && value instanceof Array && value.length > 0) { const roleFlag = value