diff --git a/web/tenant/src/router/tenant.ts b/web/tenant/src/router/tenant.ts index 32ee79e..b4ac0f5 100644 --- a/web/tenant/src/router/tenant.ts +++ b/web/tenant/src/router/tenant.ts @@ -11,6 +11,7 @@ declare module 'vue-router' { viewportTable?: boolean description?: string keywords?: string + badge?: string // 菜单项右侧徽章文本 } } @@ -171,7 +172,7 @@ const tenantRoutes: RouteRecordRaw[] = [ path: 'playground', name: 'TenantPlayground', component: () => import('@/views/service/PlaygroundPage.vue'), - meta: { title: '在线体验', icon: 'terminal', sort: 50, roles: ['owner', 'admin', 'member'] }, + meta: { title: '在线体验', icon: 'terminal', sort: 50, roles: ['owner', 'admin', 'member'], badge: '⚡' }, }, { path: 'tickets', diff --git a/web/tenant/src/views/Layout.vue b/web/tenant/src/views/Layout.vue index 21e3ccb..5fb5e0d 100644 --- a/web/tenant/src/views/Layout.vue +++ b/web/tenant/src/views/Layout.vue @@ -55,6 +55,7 @@ interface NavItem { label: string path: string icon: string + badge?: string } const navItems = computed(() => { @@ -71,6 +72,7 @@ const navItems = computed(() => { label: r.meta.title as string, path: r.path, icon: r.meta.icon as string, + badge: r.meta.badge as string | undefined, })) }) @@ -281,6 +283,15 @@ onBeforeUnmount(() => { {{ item.label }} + + + {{ item.badge }} + +