diff --git a/vue-admin-wonderful-next/src/router/index.ts b/vue-admin-wonderful-next/src/router/index.ts index 627d978..2bc435e 100644 --- a/vue-admin-wonderful-next/src/router/index.ts +++ b/vue-admin-wonderful-next/src/router/index.ts @@ -9,189 +9,304 @@ export const dynamicRoutes = [ title: '首页', isLink: '', isHide: false, + isKeepAlive: true, icon: 'iconfont icon-shouye' }, - children: [ - { - path: '/home', - component: () => import('/@/views/home/index.vue'), - meta: { - title: '首页', - isLink: '', - isHide: false, - icon: 'iconfont icon-shouye' - } + children: [{ + path: '/home', + component: () => import('/@/views/home/index.vue'), + meta: { + title: '首页', + isLink: '', + isHide: false, + isKeepAlive: true, + icon: 'iconfont icon-shouye' } - ] - }, - { - path: '/system', - component: () => import('/@/views/layout/index.vue'), - redirect: '/system/menu', - meta: { - title: '系统设置', - isLink: '', - isHide: false, - icon: 'iconfont icon-xitongshezhi' }, - children: [ - { - path: '/system/menu', - component: () => import('/@/views/system/menu/index.vue'), - meta: { - title: '菜单管理', - isLink: '', - isHide: false, - icon: 'iconfont icon-caidan' - } + { + path: '/system', + name: 'system', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/system/menu', + meta: { + title: '系统设置', + isLink: '', + isHide: false, + icon: 'iconfont icon-xitongshezhi', + isKeepAlive: true }, - { - path: '/system/user', - component: () => import('/@/views/system/user/index.vue'), - meta: { - title: '用户管理', - isLink: '', - isHide: false, - icon: 'iconfont icon-icon-' - } - } - ] - }, - { - path: '/limits', - component: () => import('/@/views/docs/index.vue'), - redirect: '/limits/frontEnd', - meta: { - title: '权限管理', - isLink: '', - isHide: false, - icon: 'iconfont icon-quanxian' - }, - children: [ - { - path: '/limits/frontEnd', - component: () => import('/@/views/docs/index.vue'), - redirect: '/limits/frontEnd/page', - meta: { - title: '前端控制', - isLink: '', - isHide: false - }, - children: [ - { - path: '/limits/frontEnd/page', - component: () => import('/@/views/docs/index.vue'), - meta: { - title: '页面权限', - isLink: '', - isHide: false - } - }, - { - path: '/limits/frontEnd/btn', - component: () => import('/@/views/docs/index.vue'), - meta: { - title: '按钮权限', - isLink: '', - isHide: false - } + children: [ + { + path: '/system/menu', + name: "systemMenu", + component: () => import('/@/views/system/menu/index.vue'), + meta: { + title: '菜单管理', + isLink: '', + isHide: false, + icon: 'iconfont icon-caidan', + isKeepAlive: true + } + }, + { + path: '/system/user', + name: "systemUser", + component: () => import('/@/views/system/user/index.vue'), + meta: { + title: '用户管理', + isLink: '', + isHide: false, + icon: 'iconfont icon-icon-', + isKeepAlive: false } - ] - }, - { - path: '/limits/backEnd', - component: () => import('/@/views/docs/index.vue'), - meta: { - title: '后端控制', - isLink: '', - isHide: false } + ] + }, + { + path: '/limits', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/limits/frontEnd', + meta: { + title: '权限管理', + isLink: '', + isHide: false, + icon: 'iconfont icon-quanxian' + }, + children: [ + { + path: '/limits/frontEnd', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/limits/frontEnd/page', + meta: { + title: '前端控制', + isLink: '', + isHide: false + }, + children: [ + { + path: '/limits/frontEnd/page', + component: () => import('/@/views/limits/frontEnd/page/index.vue'), + meta: { + title: '页面权限', + isLink: '', + isHide: false + } + }, + { + path: '/limits/frontEnd/btn', + component: () => import('/@/views/limits/frontEnd/btn/index.vue'), + meta: { + title: '按钮权限', + isLink: '', + isHide: false + } + } + ] + }, + { + path: '/limits/backEnd', + component: () => import('/@/views/layout/routerView/parent.vue'), + meta: { + title: '后端控制', + isLink: '', + isHide: false + }, + children: [ + { + path: '/limits/backEnd/page', + component: () => import('/@/views/limits/backEnd/page/index.vue'), + meta: { + title: '页面权限', + isLink: '', + isHide: false + } + }, + { + path: '/limits/backEnd/btn', + component: () => import('/@/views/limits/backEnd/btn/index.vue'), + meta: { + title: '按钮权限', + isLink: '', + isHide: false + } + } + ] + } + ] + }, + { + path: '/menu', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/menu/menu1', + meta: { + title: '路由嵌套', + isLink: '', + isHide: false, + icon: 'iconfont icon-xitongshezhi' + }, + children: [ + { + path: '/menu/menu1', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/menu/menu1/menu11', + meta: { + title: '菜单1', + isLink: '', + isHide: false, + icon: 'iconfont icon-caidan' + }, + children: [ + { + path: '/menu/menu1/menu11', + component: () => import('/@/views/menu/menu1/menu11/index.vue'), + meta: { + title: '菜单11', + isLink: '', + isHide: false, + icon: 'iconfont icon-caidan' + } + }, + { + path: '/menu/menu1/menu12', + component: () => import('/@/views/layout/routerView/parent.vue'), + redirect: '/menu/menu1/menu12/menu121', + meta: { + title: '菜单12', + isLink: '', + isHide: false, + icon: 'iconfont icon-caidan' + }, + children: [ + { + path: '/menu/menu1/menu12/menu121', + component: () => import('/@/views/menu/menu1/menu12/menu121/index.vue'), + meta: { + title: '菜单121', + isLink: '', + isHide: false, + icon: 'iconfont icon-caidan' + } + }, + { + path: '/menu/menu1/menu12/menu122', + component: () => import('/@/views/menu/menu1/menu12/menu122/index.vue'), + meta: { + title: '菜单122', + isLink: '', + isHide: false, + icon: 'iconfont icon-caidan' + } + } + ] + }, + { + path: '/menu/menu1/menu13', + component: () => import('/@/views/menu/menu1/menu13/index.vue'), + meta: { + title: '菜单13', + isLink: '', + isHide: false, + icon: 'iconfont icon-caidan' + } + } + ] + }, + { + path: '/menu/menu2', + component: () => import('/@/views/menu/menu2/index.vue'), + meta: { + title: '菜单2', + isLink: '', + isHide: false, + icon: 'iconfont icon-caidan' + } + } + ] + }, + { + path: '/fun', + component: () => import('/@/views/fun/index.vue'), + meta: { + title: '功能', + isLink: '', + isHide: false, + icon: 'iconfont icon-crew_feature' } - ] - }, - { - path: '/fun', - component: () => import('/@/views/docs copy 1/index.vue'), - meta: { - title: '功能', - isLink: '', - isHide: false, - icon: 'iconfont icon-crew_feature' - } - }, - { - path: '/pages', - component: () => import('/@/views/docs copy 1/index.vue'), - meta: { - title: '页面', - isLink: '', - isHide: false, - icon: 'iconfont icon-fuzhiyemian' - } - }, - { - path: '/components', - component: () => import('/@/views/docs copy 1/index.vue'), - meta: { - title: '组件', - isLink: '', - isHide: false, - icon: 'iconfont icon-zujian' - } - }, - { - path: '/chart', - component: () => import('/@/views/docs copy 1/index.vue'), - meta: { - title: '大数据图表', - isLink: '', - isHide: false, - icon: 'iconfont icon-ico_shuju' - } - }, - { - path: '/docs1', - component: () => import('/@/views/docs copy 1/index.vue'), - meta: { - title: '个人中心', - isLink: '', - isHide: false, - icon: 'iconfont icon-gerenzhongxin' - } - }, - { - path: '/docs2', - component: () => import('/@/views/docs copy 2/index.vue'), - meta: { - title: '工具类集合', - isLink: '', - isHide: false, - icon: 'iconfont icon-gongju' - } - }, - { - path: '/docs3', - component: () => import('/@/views/docs copy 3/index.vue'), - meta: { - title: '外链', - isLink: '', - isHide: false, - icon: 'iconfont icon-caozuo-wailian' - } - }, - { - path: '/iframe', - component: () => import('/@/views/docs copy 3/index.vue'), - meta: { - title: '内嵌 iframe', - isLink: '', - isHide: false, - icon: 'iconfont icon-neiqianshujuchucun' - } + }, + { + path: '/pages', + component: () => import('/@/views/pages/index.vue'), + meta: { + title: '页面', + isLink: '', + isHide: false, + icon: 'iconfont icon-fuzhiyemian' + } + }, + { + path: '/components', + component: () => import('/@/views/components/index.vue'), + meta: { + title: '组件', + isLink: '', + isHide: false, + icon: 'iconfont icon-zujian' + } + }, + { + path: '/chart', + component: () => import('/@/views/chart/index.vue'), + meta: { + title: '大数据图表', + isLink: '', + isHide: false, + icon: 'iconfont icon-ico_shuju' + } + }, + { + path: '/personal', + component: () => import('/@/views/personal/index.vue'), + meta: { + title: '个人中心', + isLink: '', + isHide: false, + icon: 'iconfont icon-gerenzhongxin' + } + }, + { + path: '/tools', + component: () => import('/@/views/tools/index.vue'), + meta: { + title: '工具类集合', + isLink: '', + isHide: false, + icon: 'iconfont icon-gongju' + } + }, + { + path: '/link', + component: () => import('/@/views/layout/routerView/parent.vue'), + meta: { + title: '外链', + isLink: '', + isHide: false, + icon: 'iconfont icon-caozuo-wailian' + } + }, + { + path: '/iframe', + component: () => import('/@/views/layout/routerView/iframe.vue'), + meta: { + title: '内嵌 iframe', + isLink: '', + isHide: false, + icon: 'iconfont icon-neiqianshujuchucun' + } + }] } ] -export const staticRoutes: Array = [ +const staticRoutes: Array = [ { path: '/login', component: () => import('/@/views/login/index.vue'), diff --git a/vue-admin-wonderful-next/src/theme/element.scss b/vue-admin-wonderful-next/src/theme/element.scss index 4d1c342..8e63dfb 100644 --- a/vue-admin-wonderful-next/src/theme/element.scss +++ b/vue-admin-wonderful-next/src/theme/element.scss @@ -786,6 +786,10 @@ width: 24px; text-align: center; } +// 获取焦点时 +.el-menu-item:focus { + background: transparent !important; +} /* Tabs 标签页 ------------------------------- */ diff --git a/vue-admin-wonderful-next/src/views/chart/index.vue b/vue-admin-wonderful-next/src/views/chart/index.vue new file mode 100644 index 0000000..3c386c6 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/chart/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/components/index.vue b/vue-admin-wonderful-next/src/views/components/index.vue new file mode 100644 index 0000000..b2b64fe --- /dev/null +++ b/vue-admin-wonderful-next/src/views/components/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 1/index.vue b/vue-admin-wonderful-next/src/views/docs copy 1/index.vue deleted file mode 100644 index 822eeaf..0000000 --- a/vue-admin-wonderful-next/src/views/docs copy 1/index.vue +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 2/index.vue b/vue-admin-wonderful-next/src/views/docs copy 2/index.vue deleted file mode 100644 index 822eeaf..0000000 --- a/vue-admin-wonderful-next/src/views/docs copy 2/index.vue +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/docs copy 3/index.vue b/vue-admin-wonderful-next/src/views/docs copy 3/index.vue deleted file mode 100644 index 822eeaf..0000000 --- a/vue-admin-wonderful-next/src/views/docs copy 3/index.vue +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/fun/index.vue b/vue-admin-wonderful-next/src/views/fun/index.vue new file mode 100644 index 0000000..09406f2 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/fun/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/component/aside.vue b/vue-admin-wonderful-next/src/views/layout/component/aside.vue index af44d40..f3dc3f3 100644 --- a/vue-admin-wonderful-next/src/views/layout/component/aside.vue +++ b/vue-admin-wonderful-next/src/views/layout/component/aside.vue @@ -32,7 +32,7 @@ export default { // 设置/过滤路由(非静态路由/是否显示在菜单中) const setFilterRoutes = () => { store.dispatch("setRoutes"); - state.menuList = filterRoutesFun(store.state.routes); + state.menuList = filterRoutesFun(store.state.routes[0].children); }; // 路由过滤递归函数 const filterRoutesFun = (arr: Array) => { diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue index d6d7b43..b6dff50 100644 --- a/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue +++ b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue @@ -40,7 +40,6 @@ export default { breadcrumbList: [{ meta: { title: "", icon: "" } }], // 定义初始值,不能为空数组,否则 v-for 报错 }); const getBreadcrumbList = (matched: any) => { - console.log(matched); state.breadcrumbList = matched; }; const onBreadcrumbClick = (v: object) => { diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/tagsView.vue b/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/tagsView.vue index d63cc52..11e3e1f 100644 --- a/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/tagsView.vue +++ b/vue-admin-wonderful-next/src/views/layout/navBars/tagsView/tagsView.vue @@ -128,8 +128,8 @@ export default { }); onBeforeRouteUpdate((to) => { state.routePath = to.path; - getTagsRefsIndex(to.path); - moveToCurrentTag(); + // getTagsRefsIndex(to.path); + // moveToCurrentTag(); }); return { isActive, diff --git a/vue-admin-wonderful-next/src/views/layout/routerView/iframe.vue b/vue-admin-wonderful-next/src/views/layout/routerView/iframe.vue new file mode 100644 index 0000000..de0c0ae --- /dev/null +++ b/vue-admin-wonderful-next/src/views/layout/routerView/iframe.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/layout/routerView/parent.vue b/vue-admin-wonderful-next/src/views/layout/routerView/parent.vue index c1ac52b..fa33a5c 100644 --- a/vue-admin-wonderful-next/src/views/layout/routerView/parent.vue +++ b/vue-admin-wonderful-next/src/views/layout/routerView/parent.vue @@ -1,11 +1,13 @@ \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/limits/backEnd/page/index.vue b/vue-admin-wonderful-next/src/views/limits/backEnd/page/index.vue new file mode 100644 index 0000000..60389bf --- /dev/null +++ b/vue-admin-wonderful-next/src/views/limits/backEnd/page/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/limits/frontEnd/btn/index.vue b/vue-admin-wonderful-next/src/views/limits/frontEnd/btn/index.vue new file mode 100644 index 0000000..d41073e --- /dev/null +++ b/vue-admin-wonderful-next/src/views/limits/frontEnd/btn/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/limits/frontEnd/page/index.vue b/vue-admin-wonderful-next/src/views/limits/frontEnd/page/index.vue new file mode 100644 index 0000000..555ce56 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/limits/frontEnd/page/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/menu/menu1/menu11/index.vue b/vue-admin-wonderful-next/src/views/menu/menu1/menu11/index.vue new file mode 100644 index 0000000..9a3fd99 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/menu/menu1/menu11/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/menu/menu1/menu12/menu121/index.vue b/vue-admin-wonderful-next/src/views/menu/menu1/menu12/menu121/index.vue new file mode 100644 index 0000000..3af54a8 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/menu/menu1/menu12/menu121/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/menu/menu1/menu12/menu122/index.vue b/vue-admin-wonderful-next/src/views/menu/menu1/menu12/menu122/index.vue new file mode 100644 index 0000000..4816fab --- /dev/null +++ b/vue-admin-wonderful-next/src/views/menu/menu1/menu12/menu122/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/menu/menu1/menu13/index.vue b/vue-admin-wonderful-next/src/views/menu/menu1/menu13/index.vue new file mode 100644 index 0000000..80cac79 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/menu/menu1/menu13/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/menu/menu2/index.vue b/vue-admin-wonderful-next/src/views/menu/menu2/index.vue new file mode 100644 index 0000000..07df75f --- /dev/null +++ b/vue-admin-wonderful-next/src/views/menu/menu2/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/pages/index.vue b/vue-admin-wonderful-next/src/views/pages/index.vue new file mode 100644 index 0000000..523f8f4 --- /dev/null +++ b/vue-admin-wonderful-next/src/views/pages/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/personal/index.vue b/vue-admin-wonderful-next/src/views/personal/index.vue new file mode 100644 index 0000000..544830b --- /dev/null +++ b/vue-admin-wonderful-next/src/views/personal/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/system/user/index.vue b/vue-admin-wonderful-next/src/views/system/user/index.vue index 32caf08..1d666bb 100644 --- a/vue-admin-wonderful-next/src/views/system/user/index.vue +++ b/vue-admin-wonderful-next/src/views/system/user/index.vue @@ -1,12 +1,21 @@ \ No newline at end of file diff --git a/vue-admin-wonderful-next/src/views/tools/index.vue b/vue-admin-wonderful-next/src/views/tools/index.vue new file mode 100644 index 0000000..0726d4b --- /dev/null +++ b/vue-admin-wonderful-next/src/views/tools/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file