vue-nuxt-permission
Version:
A unified permission system for Vue 3 and Nuxt 3 / Nuxt 4 with directives, guards, and async support.
26 lines (25 loc) • 883 B
TypeScript
import { DirectiveBinding } from 'vue';
/**
* v-permission directive
* -----------------------
* Usage:
* <button v-permission="'admin'">Admin Only</button>
* <div v-permission:show="['editor','moderator']">Visible only for editors</div>
*/
interface PermissionElement extends HTMLElement {
_vPermissionOriginalDisplay?: string;
_vPermissionSkipUpdates?: boolean;
_vPermissionParent?: Node | null;
_vPermissionNextSibling?: Node | null;
_vPermissionComment?: Comment | null;
_vPermissionValueRef?: any;
_vPermissionUnwatch?: () => void;
_vPermissionUseShow?: boolean;
}
export declare const vPermission: {
mounted(el: PermissionElement, binding: DirectiveBinding): void;
updated(el: PermissionElement, binding: DirectiveBinding): void;
unmounted(el: PermissionElement): void;
};
export {};
//# sourceMappingURL=v-permission.d.ts.map