import store from '@/store'; export function useRole() { function hasAny(roles: string[]): boolean { const roleStore: string[] = store.state.roles; for (const role of roles) { if (roleStore.indexOf(role) !== -1) return true; } return false; } return { hasAny, }; }