{"remainingRequest":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/directive/permission/hasRole.js","dependencies":[{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/directive/permission/hasRole.js","mtime":1701742078547},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/babel.config.js","mtime":1701742078504},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js","mtime":456789000000}],"contextDependencies":[],"result":["// +----------------------------------------------------------------------\n// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]\n// +----------------------------------------------------------------------\n// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.\n// +----------------------------------------------------------------------\n// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权\n// +----------------------------------------------------------------------\n// | Author: CRMEB Team <admin@crmeb.com>\n// +----------------------------------------------------------------------\n\nimport store from '@/store';\nexport default {\n  inserted: function inserted(el, binding, vnode) {\n    var value = binding.value;\n    var super_admin = 'admin';\n    var roles = store.state.user.name;\n    if (value && value instanceof Array && value.length > 0) {\n      var roleFlag = value;\n      var hasRole = roles.some(function (role) {\n        return super_admin === role || roleFlag.includes(role);\n      });\n      if (!hasRole) {\n        el.parentNode && el.parentNode.removeChild(el);\n      }\n    } else {\n      throw new Error(\"\\u8BF7\\u8BBE\\u7F6E\\u89D2\\u8272\\u6743\\u9650\\u6807\\u7B7E\\u503C\\\"\");\n    }\n  }\n};",null]}