From 43e7a1f5a1b89c91b94d0a8aa728e1acfffb424b Mon Sep 17 00:00:00 2001 From: From-wh Date: Thu, 27 Apr 2023 16:24:12 +0800 Subject: [PATCH] =?UTF-8?q?improve:=20=E9=89=B4=E6=9D=83=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/utils/auth.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/template/admin/src/utils/auth.js b/template/admin/src/utils/auth.js index ab0a7bcf9..7d071744d 100644 --- a/template/admin/src/utils/auth.js +++ b/template/admin/src/utils/auth.js @@ -19,15 +19,14 @@ export default { async install(Vue, options) { Vue.directive('auth', { inserted(el, binding, vnode) { - const { value } = binding; - const access = store.state.userInfo.access; - - if (value && value instanceof Array && value.length && access && access.length) { - const isPermission = includeArray(value, access); - if (!isPermission) { - el.parentNode && el.parentNode.removeChild(el); - } - } + // const { value } = binding; + // const access = store.state.userInfo.access; + // if (value && value instanceof Array && value.length && access && access.length) { + // const isPermission = includeArray(value, access); + // if (!isPermission) { + // el.parentNode && el.parentNode.removeChild(el); + // } + // } }, }); },