优化菜单在不同权限配置下的显示
This commit is contained in:
parent
56fe4bcae4
commit
04dc3848a7
@ -81,6 +81,7 @@ export default class extends Vue {
|
||||
@Prop({ default: '' }) private basePath!: string
|
||||
|
||||
get alwaysShowRootMenu() {
|
||||
console.log('alwaysShowRootMenu', this.item)
|
||||
if (this.item.meta && this.item.meta.alwaysShow) {
|
||||
return true
|
||||
}
|
||||
|
@ -7,7 +7,8 @@ const gameRoutes: RouteConfig = {
|
||||
meta: {
|
||||
title: 'game',
|
||||
icon: 'game',
|
||||
alwaysShow: true
|
||||
alwaysShow: true,
|
||||
permissions: ['sysgame:*']
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -7,7 +7,8 @@ const marketingRoutes: RouteConfig = {
|
||||
meta: {
|
||||
title: 'marketing',
|
||||
icon: 'sell',
|
||||
alwaysShow: true
|
||||
alwaysShow: true,
|
||||
permissions: ['coupon:*']
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ const questionRoutes: RouteConfig = {
|
||||
meta: {
|
||||
title: 'question',
|
||||
icon: 'question_list',
|
||||
permissions: ['question:*', 'shop:tiku_setting'],
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
|
@ -7,7 +7,8 @@ const shopRoutes: RouteConfig = {
|
||||
meta: {
|
||||
title: 'shop',
|
||||
icon: 'shop',
|
||||
alwaysShow: true
|
||||
alwaysShow: true,
|
||||
permissions: ['shopadmin:*', 'shop:game_setting', 'activity:*']
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ const systemRoutes: RouteConfig = {
|
||||
meta: {
|
||||
title: 'system',
|
||||
icon: 'component',
|
||||
permissions: ['shopman:*', 'permission:*', 'admin:*', 'role:*'],
|
||||
alwaysShow: true
|
||||
},
|
||||
children: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user