|
@@ -0,0 +1,13 @@
|
|
|
+import {useAppStore} from "~src/store";
|
|
|
+const store = useAppStore();
|
|
|
+
|
|
|
+//自定义权限指令
|
|
|
+export const vAuthBtn = {
|
|
|
+ mounted(el, {value}) {
|
|
|
+ if (value && value.length > 0 && value[0]) {
|
|
|
+ if (el.parentNode && !store.getButtonsVal(value[0])) {
|
|
|
+ el.parentNode.removeChild(el);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|