mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-09 10:01:32 +08:00
13 lines
271 B
JavaScript
13 lines
271 B
JavaScript
import { useUserStore } from "@/stores/user";
|
|
|
|
export const perms = (perms) => {
|
|
if (!perms) return true;
|
|
const userStore = useUserStore();
|
|
const auth = userStore.auth;
|
|
|
|
let find = auth.find((item) => {
|
|
return item.action === perms;
|
|
});
|
|
return !!find;
|
|
};
|