Browse Source

修改样式

master
rose 4 years ago
parent
commit
aa26cdc114
  1. 5
      src/layout/components/Sidebar/SidebarItem.vue
  2. 78
      src/router/index.js

5
src/layout/components/Sidebar/SidebarItem.vue

@ -1,11 +1,14 @@
<template> <template>
<div v-if="!item.hidden"> <div v-if="!item.hidden">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"> <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)"> <app-link v-if="onlyOneChild.meta && onlyOneChild.meta.title !== '搜索管理'" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}"> <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" /> <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
</el-menu-item> </el-menu-item>
</app-link> </app-link>
<el-menu-item v-else :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
</el-menu-item>
</template> </template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body> <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>

78
src/router/index.js

@ -51,22 +51,18 @@ export const constantRoutes = [
path: 'dashboard', path: 'dashboard',
name: 'dashboard', name: 'dashboard',
component: () => import('@/views/dashboard/index'), component: () => import('@/views/dashboard/index'),
meta: { title: '服务平台管理系统', icon: '' } meta: { title: '推策服务平台管理系统', icon: '' }
}] }]
}, },
{ {
path: '/example', path: '/rotation',
component: Layout, component: Layout,
redirect: '/example/table', redirect: '/example/table',
name: 'Example', name: 'Example',
meta: { title: '首页管理', icon: 'nested' }, meta: { title: '首页管理', icon: 'nested' },
children: [{ children: [
path: 'policy',
name: 'Policy',
component: () => import('@/views/firstPages/policy'),
meta: { title: '政策管理', icon: '' }
},
{ {
path: 'Rotation', path: 'Rotation',
name: 'Rotation', name: 'Rotation',
@ -74,16 +70,31 @@ export const constantRoutes = [
meta: { title: '轮播图管理', icon: '' } meta: { title: '轮播图管理', icon: '' }
}, },
{ {
path: 'Train', path: 'rotation',
name: 'Train', name: 'rotation',
component: () => import('@/views/firstPages/train'), meta: { title: '搜索管理', icon: '' },
meta: { title: '培训管理', icon: '' }
}, },
// {
// path: 'Notice',
// name: 'Notice',
// component: () => import('@/views/firstPages/notice'),
// meta: { title: '发榜管理', icon: '' }
// },
]
},
{ {
path: 'Notice', path: '/policy',
name: 'Notice', component: Layout,
component: () => import('@/views/firstPages/notice'), redirect: '/example/table',
meta: { title: '发榜管理', icon: '' } name: 'Example',
meta: { title: '政策管理', icon: 'nested' },
children: [{
path: 'policy',
name: 'Policy',
component: () => import('@/views/firstPages/policy'),
meta: { title: '政策管理', icon: '' }
}, },
{ {
path: 'typemanage', path: 'typemanage',
@ -93,7 +104,7 @@ export const constantRoutes = [
}] }]
}, },
{ {
path: '/enterprise', path: '/enterprise',
component: Layout, component: Layout,
redirect: '/example/table', redirect: '/example/table',
@ -115,6 +126,39 @@ export const constantRoutes = [
] ]
}, },
{
path: '/train',
component: Layout,
redirect: '/example/table',
name: 'Example',
meta: { title: '管理', icon: 'nested' },
children: [
{
path: 'train',
name: 'train',
component: () => import('@/views/firstPages/train'),
meta: { title: '培训管理', icon: '' }
},
]
},
{
path: '/Notice',
name: 'Notice',
component: Layout,
redirect: '/Notice',
meta: { title: '发榜管理', icon: 'nested' },
children: [{
path: 'Notice',
name: 'Notice',
component: () => import('@/views/firstPages/notice'),
meta: { title: '发榜管理', icon: '' }
}]
},
// { // {
// path: '/nested', // path: '/nested',
// component: Layout, // component: Layout,

Loading…
Cancel
Save