Skip to content

Function: createRoleDirective() ​

ts
function createRoleDirective(rbac): Directive<HTMLElement, NameList>;

Defined in: packages/vue/src/directives.ts:62

v-role="'admin'", v-role="'writer|editor'", v-role="['a', 'b']" — any of the roles. v-role.all="[...]" — all of them. v-role.not="'banned'" — negated.

Parameters ​

ParameterType
rbacVueRbac

Returns ​

Directive<HTMLElement, NameList>

Released under the MIT License. Inspired by spatie/laravel-permission.