Commit ba4d78e1 by 张杰

修改权限按钮组件

1 parent a00e9582
......@@ -11,6 +11,10 @@ export default {
type: [String, Number],
default: "",
},
name: {
type: String,
default: "",
},
type: {
type: [String, Number],
default: "default",
......@@ -23,14 +27,14 @@ export default {
data() {
return {};
},
mounted() {
},
mounted() {},
methods: {
// 判断是否有权限
hasPermission() {
let id = this.uid;
let _name = this.name;
let list = this.$root.parentCommon.getAuthData();
let idx = list.findIndex((k) => k.id == id);
let idx = list.findIndex((k) => k.id == id || k.label == _name);
if (idx < 0) {
return false;
} else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!