mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
fix: permission directive
This commit is contained in:
parent
b82a3d3a2e
commit
653bafaa2b
@ -9,7 +9,7 @@ export const auth: Directive = {
|
||||
const authRoles = value;
|
||||
const hasAuth = usePermissionStoreHook().buttonAuth.includes(authRoles);
|
||||
if (!hasAuth) {
|
||||
el.style.display = "none";
|
||||
el.parentNode.removeChild(el);
|
||||
}
|
||||
} else {
|
||||
throw new Error("need roles! Like v-auth=\"['admin','test']\"");
|
||||
|
Loading…
x
Reference in New Issue
Block a user