ct/app/components/AppHeader.vue
2025-09-30 12:02:39 +08:00

78 lines
1.8 KiB
Vue

<script lang="ts" setup>
import type {NavigationMenuItem} from '@nuxt/ui'
const route = useRoute()
const items = computed<NavigationMenuItem[]>(() => [
{
label: '首页',
to: '/docs/getting-started',
active: route.path.startsWith('/docs/getting-started')
},
{
label: '共享解决方案',
to: '/docs/components',
active: route.path.startsWith('/docs/components')
},
{
label: '行业解决方案',
to: 'https://go.nuxt.com/figma-ui',
target: '_blank'
},
{
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'
}, {
label: '后台管理',
to: 'https://ele.ccttiot.com/login',
target: '_blank'
}
])
</script>
<template>
<UHeader class="min-w-full">
<template #title>
<IndexLogo class="h-6 w-auto"/>
</template>
<UNavigationMenu :items="items" color="primary"/>
<template #right>
<ColorModeButton/>
<!-- <UTooltip :kbds="['meta', 'G']" text="Open on GitHub">-->
<!-- <UButton-->
<!-- aria-label="GitHub"-->
<!-- color="neutral"-->
<!-- icon="i-simple-icons-github"-->
<!-- target="_blank"-->
<!-- to="https://github.com/nuxt/ui"-->
<!-- variant="ghost"-->
<!-- />-->
<!-- </UTooltip>-->
</template>
<template #body>
<div class="px-4 py-2">
<UNavigationMenu
:items="items"
class="-mx-2.5"
color="primary"
orientation="vertical"
/>
</div>
</template>
</UHeader>
</template>