ct/app/components/AppHeader.vue

118 lines
3.0 KiB
Vue
Raw Normal View History

2025-09-29 14:45:33 +08:00
<script lang="ts" setup>
import type {NavigationMenuItem} from '@nuxt/ui'
2025-09-29 16:16:44 +08:00
const route = useRoute()
const items = computed<NavigationMenuItem[]>(() => [
{
2025-09-29 18:02:28 +08:00
label: '首页',
2025-09-30 14:15:49 +08:00
to: '/',
2025-09-29 16:16:44 +08:00
},
{
2025-09-29 18:02:28 +08:00
label: '共享解决方案',
2025-09-30 14:15:49 +08:00
active: route.path.startsWith('/sharedSolutions'),
children: [
2025-10-07 14:26:35 +08:00
{
label: '共享单车',
icon: 'i-lucide-bike',
description: '一种新型环保共享经济,最大化的利用了公共道路通过率',
to: '/sharedSolutions/bike',
},
{
label: '景区共享电动车',
icon: 'i-lucide-map-pin',
description: '有助于缓解交通堵塞,以及公路的磨损,减少空气污染,降低对能量的依赖性',
to: '/sharedSolutions/scenicEbike',
},
{
label: '共享滑板车',
icon: 'i-lucide-scooter',
description: '新的共享出行方式,轻便省力',
to: '/sharedSolutions/scooter',
},
{
label: '共享陪护床',
icon: 'i-lucide-bed',
description: '立足医院民生需求而诞生,解决医患家属的休息问题',
to: '/sharedSolutions/bed',
},
2025-09-30 14:15:49 +08:00
{
label: '共享电动车',
2025-10-07 14:26:35 +08:00
icon: 'i-lucide-car',
2025-09-30 14:15:49 +08:00
description: '通过扫码开锁,循环共享',
to: '/sharedSolutions/eBike',
2025-10-07 14:26:35 +08:00
},
{
label: '共享充电宝',
icon: 'i-lucide-battery',
description: '企业提供的充电租赁设备,用户扫码取出后即可使用,用完后就近归还',
to: '/sharedSolutions/powerbank',
}
]
},
{
label: '行业解决方案',
active: route.path.startsWith('/industrySolutions'),
children: [
{
label: '智能电动车',
2025-09-30 14:15:49 +08:00
icon: 'i-lucide-file-text',
2025-10-07 14:26:35 +08:00
description: '打造智能电动车时代方便用户的出行,让骑车出行便捷',
to: '/industrySolutions/ElectCar',
2025-09-30 14:15:49 +08:00
}, {
label: '共享电动车',
icon: 'i-lucide-file-text',
description: '通过扫码开锁,循环共享',
to: '/sharedSolutions/eBike',
2025-10-07 14:26:35 +08:00
}
2025-09-30 14:15:49 +08:00
]
2025-09-29 16:16:44 +08:00
},
{
2025-09-29 18:02:28 +08:00
label: '软件应用开发',
to: 'https://github.com/nuxt/ui/releases',
target: '_blank'
},
{
label: '物联网解决方案',
to: 'https://github.com/nuxt/ui/releases',
target: '_blank'
},
{
label: '关于创特',
2025-10-07 10:12:59 +08:00
to: '/about',
2025-09-29 18:02:28 +08:00
}, {
2025-09-30 12:02:39 +08:00
label: '后台管理',
to: 'https://ele.ccttiot.com/login',
2025-09-29 16:16:44 +08:00
target: '_blank'
}
2025-09-29 18:02:28 +08:00
2025-09-29 16:16:44 +08:00
])
2025-09-29 14:45:33 +08:00
</script>
<template>
2025-09-29 18:02:28 +08:00
<UHeader class="min-w-full">
2025-09-29 16:16:44 +08:00
<template #title>
2025-09-29 16:38:44 +08:00
<IndexLogo class="h-6 w-auto"/>
2025-09-29 16:16:44 +08:00
</template>
2025-09-30 12:02:39 +08:00
<UNavigationMenu :items="items" color="primary"/>
2025-09-29 16:16:44 +08:00
<template #right>
<ColorModeButton/>
</template>
<template #body>
<div class="px-4 py-2">
<UNavigationMenu
:items="items"
class="-mx-2.5"
2025-09-30 12:02:39 +08:00
color="primary"
2025-09-29 16:16:44 +08:00
orientation="vertical"
/>
</div>
</template>
</UHeader>
2025-09-29 14:45:33 +08:00
</template>