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'] }