优化体验

This commit is contained in:
eafonyang
2026-07-10 10:16:24 +08:00
parent 6fab4a86d4
commit 6bb39e9172
5 changed files with 152 additions and 24 deletions
+12 -11
View File
@@ -24,16 +24,16 @@
:class="{ 'is-active': isSidebarCollapsed }"
aria-label="主导航"
>
<router-link
<a
v-for="item in railNavItems"
:key="item.path"
:to="item.path"
:key="item.title"
href="#"
class="sidebar-rail-item"
:class="{ 'is-active': activeMenu === item.path }"
:title="item.title"
@click.prevent="handleRailClick"
>
<el-icon><component :is="item.icon" /></el-icon>
</router-link>
</a>
</nav>
<el-menu
@@ -187,14 +187,15 @@ watch(
)
const railNavItems = [
{ path: '/brand', title: '品牌管理', icon: Collection },
{ path: '/model', title: '型号管理', icon: List },
{ path: '/ota', title: 'OTA 管理', icon: Document },
{ path: '/blacklist', title: '黑名单', icon: Warning },
{ path: '/ota-target-device', title: '定向升级', icon: Aim },
{ path: '/share-code/log', title: '分享日志', icon: Share }
{ title: '耳机管理', icon: Headset },
{ title: '升级管理', icon: Upload },
{ title: '分享码', icon: Share }
]
function handleRailClick() {
isSidebarCollapsed.value = false
}
const breadcrumbTitle = computed(() => {
if (route.path === '/home') return ''
const t = route.meta?.title