优化菜单在不同权限配置下的显示

This commit is contained in:
zhl 2021-05-08 16:51:33 +08:00
parent 56fe4bcae4
commit 04dc3848a7
6 changed files with 9 additions and 3 deletions

View File

@ -81,6 +81,7 @@ export default class extends Vue {
@Prop({ default: '' }) private basePath!: string @Prop({ default: '' }) private basePath!: string
get alwaysShowRootMenu() { get alwaysShowRootMenu() {
console.log('alwaysShowRootMenu', this.item)
if (this.item.meta && this.item.meta.alwaysShow) { if (this.item.meta && this.item.meta.alwaysShow) {
return true return true
} }

View File

@ -7,7 +7,8 @@ const gameRoutes: RouteConfig = {
meta: { meta: {
title: 'game', title: 'game',
icon: 'game', icon: 'game',
alwaysShow: true alwaysShow: true,
permissions: ['sysgame:*']
}, },
children: [ children: [
{ {

View File

@ -7,7 +7,8 @@ const marketingRoutes: RouteConfig = {
meta: { meta: {
title: 'marketing', title: 'marketing',
icon: 'sell', icon: 'sell',
alwaysShow: true alwaysShow: true,
permissions: ['coupon:*']
}, },
children: [ children: [
{ {

View File

@ -7,6 +7,7 @@ const questionRoutes: RouteConfig = {
meta: { meta: {
title: 'question', title: 'question',
icon: 'question_list', icon: 'question_list',
permissions: ['question:*', 'shop:tiku_setting'],
alwaysShow: true alwaysShow: true
}, },
children: [ children: [

View File

@ -7,7 +7,8 @@ const shopRoutes: RouteConfig = {
meta: { meta: {
title: 'shop', title: 'shop',
icon: 'shop', icon: 'shop',
alwaysShow: true alwaysShow: true,
permissions: ['shopadmin:*', 'shop:game_setting', 'activity:*']
}, },
children: [ children: [
{ {

View File

@ -8,6 +8,7 @@ const systemRoutes: RouteConfig = {
meta: { meta: {
title: 'system', title: 'system',
icon: 'component', icon: 'component',
permissions: ['shopman:*', 'permission:*', 'admin:*', 'role:*'],
alwaysShow: true alwaysShow: true
}, },
children: [ children: [