()
| 26 | !app.config.globalProperties.$auth && Object.defineProperties(app.config.globalProperties, { |
| 27 | $auth: { |
| 28 | get () { |
| 29 | const _this = this |
| 30 | return (permissions) => { |
| 31 | const [permission, action] = permissions.split('.') |
| 32 | const permissionList = _this.$store.getters.roles.permissions |
| 33 | return permissionList.find((val) => { |
| 34 | return val.permissionId === permission |
| 35 | }).actionList.findIndex((val) => { |
| 36 | return val === action |
| 37 | }) > -1 |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | }) |
| 42 |