ct/app/components/AppHeader.vue

87 lines
1.8 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: [
{
label: '共享电动车',
icon: 'i-lucide-file-text',
description: '通过扫码开锁,循环共享',
to: '/sharedSolutions/eBike',
}, {
label: '共享电动车',
icon: 'i-lucide-file-text',
description: '通过扫码开锁,循环共享',
to: '/sharedSolutions/eBike',
}, {
label: '共享电动车',
icon: 'i-lucide-file-text',
description: '通过扫码开锁,循环共享',
to: '/sharedSolutions/eBike',
},
]
2025-09-29 16:16:44 +08:00
},
{
2025-09-29 18:02:28 +08:00
label: '行业解决方案',
2025-09-29 16:16:44 +08:00
to: 'https://go.nuxt.com/figma-ui',
target: '_blank'
},
{
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: '关于创特',
to: 'https://github.com/nuxt/ui/releases',
target: '_blank'
}, {
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>