From 0b3dcbce1de548f9b4eca0d25d9e203803bb7cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=90=89=E5=85=86?= <303176530@qq.com> Date: Sat, 4 Sep 2021 16:27:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=8C=87=E4=BB=A4=E4=BF=AE=E6=94=B9=E4=B8=BAvue3=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/directive/auth.js | 2 +- web/src/utils/asyncRouter.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/directive/auth.js b/web/src/directive/auth.js index 2b17fa7f..48be58f2 100644 --- a/web/src/directive/auth.js +++ b/web/src/directive/auth.js @@ -3,7 +3,7 @@ import { store } from '@/store' export const auth = (app) => { app.directive('auth', { // 当被绑定的元素插入到 DOM 中时…… - bind: function(el, binding) { + mounted: function(el, binding) { const userInfo = store.getters['user/userInfo'] let type = '' switch (Object.prototype.toString.call(binding.value)) { diff --git a/web/src/utils/asyncRouter.js b/web/src/utils/asyncRouter.js index c2def1db..97eed4a3 100644 --- a/web/src/utils/asyncRouter.js +++ b/web/src/utils/asyncRouter.js @@ -4,7 +4,6 @@ export const asyncRouterHandle = (asyncRouter) => { asyncRouter.map(item => { if (item.component) { item.component = dynamicImport(modules, item.component) - console.log(item.component) } else { delete item['component'] }