feat(playground):在线体验功能新增图

This commit is contained in:
chengqian committed 2026-08-03 17:00:49 +08:00
1 parent 14ff5d3eff
commit a9f5e08889
2 files changed
+13 -1

No files matched your search

+2 -1
View File
@@ -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',
+11
View File
@@ -55,6 +55,7 @@ interface NavItem {
label: string
path: string
icon: string
badge?: string
}
const navItems = computed<NavItem[]>(() => {
@@ -71,6 +72,7 @@ const navItems = computed<NavItem[]>(() => {
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(() => {
<transition name="fade">
<span v-if="!sidebarCollapsed" class="truncate">{{ item.label }}</span>
</transition>
<transition name="fade">
<span
v-if="!sidebarCollapsed && item.badge"
class="ml-auto text-base"
style="filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.6));"
>
{{ item.badge }}
</span>
</transition>
</router-link>
</div>
</nav>