From c70be85a47915c93e1b3a06960c468f5344faa52 Mon Sep 17 00:00:00 2001 From: pixelqm <303176530@qq.com> Date: Thu, 19 Sep 2019 23:49:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81menu=E5=92=8C=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QMPlusVuePage/src/store/module/router.js | 16 ++- .../view/superAdmin/authority/authority.vue | 136 +++++++++++++----- 2 files changed, 117 insertions(+), 35 deletions(-) diff --git a/QMPlusVuePage/src/store/module/router.js b/QMPlusVuePage/src/store/module/router.js index 2b2129ef..8025e841 100644 --- a/QMPlusVuePage/src/store/module/router.js +++ b/QMPlusVuePage/src/store/module/router.js @@ -16,15 +16,25 @@ export const router = { actions: { // 从后台获取动态路由 async SetAsyncRouter({ commit }) { + const baseRouter = [{ + path: '/layout', + name: 'layout', + component: "view/layout/index.vue", + meta: { + title: "底层layout" + }, + children: [] + }] const asyncRouterRes = await asyncMenu() const asyncRouter = asyncRouterRes.data.menus - asyncRouter.push({ + baseRouter[0].children = asyncRouter + baseRouter.push({ path: '*', redirect: '/404' }) - asyncRouterHandle(asyncRouter) - commit('setAsyncRouter', asyncRouter) + asyncRouterHandle(baseRouter) + commit('setAsyncRouter', baseRouter) } }, getters: { diff --git a/QMPlusVuePage/src/view/superAdmin/authority/authority.vue b/QMPlusVuePage/src/view/superAdmin/authority/authority.vue index 2278ab7d..efee867d 100644 --- a/QMPlusVuePage/src/view/superAdmin/authority/authority.vue +++ b/QMPlusVuePage/src/view/superAdmin/authority/authority.vue @@ -6,8 +6,9 @@ - + @@ -23,7 +24,7 @@ hide-on-single-page layout="total, sizes, prev, pager, next, jumper" > - + @@ -38,35 +39,69 @@ 确 定 + + + + + + -- GitLab