0
0
Fork 0
salix-front-mindshore-fork2/src/composables/useRole.ts

18 lines
343 B
TypeScript
Raw Normal View History

2022-03-11 11:59:10 +00:00
/* import store from '@/store';
2022-03-11 10:41:23 +00:00
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,
};
}
2022-03-11 11:59:10 +00:00
*/