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-14 10:31:37 +00:00
|
|
|
*/
|