From b4f9d3a8f238e3d40d97f0d947b5b4b302d0c04e Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期四, 27 五月 2021 22:06:36 +0800 Subject: [PATCH] update 优化dataScope参数防止注入 --- ruoyi-ui/src/directive/permission/index.js | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ruoyi-ui/src/directive/permission/index.js b/ruoyi-ui/src/directive/permission/index.js index d6f530d..e3d76d3 100644 --- a/ruoyi-ui/src/directive/permission/index.js +++ b/ruoyi-ui/src/directive/permission/index.js @@ -1,15 +1,15 @@ -import hasRole from './hasRole' -import hasPermi from './hasPermi' - -const install = function(Vue) { - Vue.directive('hasRole', hasRole) - Vue.directive('hasPermi', hasPermi) -} - -if (window.Vue) { - window['hasRole'] = hasRole - window['hasPermi'] = hasPermi - Vue.use(install); // eslint-disable-line -} - -export default install +import hasRole from './hasRole' +import hasPermi from './hasPermi' + +const install = function(Vue) { + Vue.directive('hasRole', hasRole) + Vue.directive('hasPermi', hasPermi) +} + +if (window.Vue) { + window['hasRole'] = hasRole + window['hasPermi'] = hasPermi + Vue.use(install); // eslint-disable-line +} + +export default install -- Gitblit v1.9.3