修改:提取设置菜单
This commit is contained in:
parent
345be49633
commit
85ded1cdbf
@ -5,7 +5,7 @@
|
||||
|
||||
import { Icon } from 'ant-design-vue'
|
||||
const IconFont = Icon.createFromIconfontCN({
|
||||
scriptUrl: '//at.alicdn.com/t/font_2024484_1hgvlgamz9c.js'
|
||||
scriptUrl: '//at.alicdn.com/t/font_2024484_acokdskxqbj.js'
|
||||
})
|
||||
|
||||
export default {
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<section class="app-main">
|
||||
<transition name="fade-transform" mode="out-in">
|
||||
<!-- <transition name="fade-transform" mode="out-in">-->
|
||||
<keep-alive v-if="$route.meta.keepAlive">
|
||||
<router-view :key="key" />
|
||||
</keep-alive>
|
||||
<router-view v-else :key="key" />
|
||||
</transition>
|
||||
<!-- </transition>-->
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
||||
@ -5,34 +5,34 @@
|
||||
|
||||
<div class="right-content">
|
||||
|
||||
<div>
|
||||
<el-menu class="el-menu-demo" mode="horizontal">
|
||||
<el-menu-item index="1" href="/setting/manager-categories">
|
||||
<router-link to="/setting/manager-cloud">
|
||||
网盘管理
|
||||
</router-link>
|
||||
</el-menu-item>
|
||||
<el-submenu index="2">
|
||||
<template slot="title">管理</template>
|
||||
<el-menu-item index="2-0">
|
||||
<router-link to="/setting/manager-blog">
|
||||
<svg-icon icon-class="blogger"></svg-icon>
|
||||
博客管理
|
||||
</router-link>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2-1">
|
||||
<router-link to="/setting/manager-categories">
|
||||
<svg-icon icon-class="leimupinleifenleileibie"></svg-icon>
|
||||
分类管理
|
||||
</router-link>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2-2">
|
||||
<svg-icon icon-class="biaoqian"></svg-icon>
|
||||
标签管理
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
</div>
|
||||
<!-- <div>-->
|
||||
<!-- <el-menu class="el-menu-demo" mode="horizontal">-->
|
||||
<!-- <el-menu-item index="1" href="/setting/manager-categories">-->
|
||||
<!-- <router-link to="/setting/manager-cloud">-->
|
||||
<!-- 网盘管理-->
|
||||
<!-- </router-link>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-submenu index="2">-->
|
||||
<!-- <template slot="title">管理</template>-->
|
||||
<!-- <el-menu-item index="2-0">-->
|
||||
<!-- <router-link to="/setting/manager-blog">-->
|
||||
<!-- <svg-icon icon-class="blogger"></svg-icon>-->
|
||||
<!-- 博客管理-->
|
||||
<!-- </router-link>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="2-1">-->
|
||||
<!-- <router-link to="/setting/manager-categories">-->
|
||||
<!-- <svg-icon icon-class="leimupinleifenleileibie"></svg-icon>-->
|
||||
<!-- 分类管理-->
|
||||
<!-- </router-link>-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- <el-menu-item index="2-2">-->
|
||||
<!-- <svg-icon icon-class="biaoqian"></svg-icon>-->
|
||||
<!-- 标签管理-->
|
||||
<!-- </el-menu-item>-->
|
||||
<!-- </el-submenu>-->
|
||||
<!-- </el-menu>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="right-username">{{username}}</div>
|
||||
<div class="right-menu">
|
||||
@ -45,7 +45,7 @@
|
||||
<el-dropdown-menu slot="dropdown" class="user-dropdown">
|
||||
<router-link to="/setting/user">
|
||||
<el-dropdown-item>
|
||||
<i class="el-icon-setting" />个人信息
|
||||
<i class="el-icon-setting" />设置
|
||||
</el-dropdown-item>
|
||||
</router-link>
|
||||
<!--<router-link to="/">-->
|
||||
|
||||
@ -31,7 +31,21 @@ export default {
|
||||
'sidebar'
|
||||
]),
|
||||
routes() {
|
||||
return this.$router.options.routes
|
||||
let routes = []
|
||||
if(this.$route.path.startsWith("/setting")){
|
||||
this.$router.options.routes.forEach(route => {
|
||||
if(route.path.startsWith("/setting")){
|
||||
routes.push(route)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$router.options.routes.forEach(route => {
|
||||
if(!route.path.startsWith("/setting")){
|
||||
routes.push(route)
|
||||
}
|
||||
})
|
||||
}
|
||||
return routes
|
||||
},
|
||||
activeMenu() {
|
||||
const route = this.$route
|
||||
|
||||
@ -152,19 +152,19 @@ export const constantRoutes = [
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/setting/user',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'setting-user',
|
||||
component: () => import('@/views/setting/user/index'),
|
||||
meta: { title: '设置' },
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/setting/user',
|
||||
// component: Layout,
|
||||
// children: [
|
||||
// {
|
||||
// path: '',
|
||||
// name: 'setting-user',
|
||||
// component: () => import('@/views/setting/user/index'),
|
||||
// meta: { title: '设置' },
|
||||
// hidden: true
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
|
||||
// {
|
||||
// path: '/demo',
|
||||
@ -187,7 +187,7 @@ export const constantRoutes = [
|
||||
path: 'editor',
|
||||
name: 'markdown',
|
||||
component: () => import('@/views/markdown/index'),
|
||||
// meta: { title: '创建文档', icon: 'md' }
|
||||
meta: { title: '创建文档', icon: 'md' }
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -215,49 +215,57 @@ export const constantRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/setting/user',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'setting-user',
|
||||
component: () => import('@/views/setting/user/index'),
|
||||
meta: { title: '个人信息' , icon: 'UserSettings'}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/setting/manager-categories',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'manager-categories',
|
||||
component: () => import('@/views/setting/articles/categoryManager'),
|
||||
meta: { title: '分类管理', icon: 'md-list' }
|
||||
meta: { title: '分类管理', icon: 'leimupinleifenleileibie' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/setting/manager-blog',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'manager-blog',
|
||||
component: () => import('@/views/setting/articles/blogManager'),
|
||||
meta: { title: '博客管理' }
|
||||
meta: { title: '博客管理' , icon: 'blogger'}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/setting/manager-cloud',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'manager-cloud',
|
||||
component: () => import('@/views/setting/cloudManager'),
|
||||
meta: { title: '网盘管理', icon: 'md-list' }
|
||||
meta: { title: '网盘管理', icon: 'yunshezhi' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/articles',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user