58 lines
1.2 KiB
Vue
58 lines
1.2 KiB
Vue
<script lang="ts" setup>
|
|
import type { SidebarNavGroup } from '~/components/app/sidebar/index.vue'
|
|
|
|
const route = useRoute()
|
|
const { breadcrumbs } = toRefs(useBreadcrumbs())
|
|
|
|
const sidebarNav: SidebarNavGroup[] = [
|
|
{
|
|
items: [
|
|
{
|
|
title: '课程管理',
|
|
url: `/course`,
|
|
icon: 'tabler:book-2',
|
|
},
|
|
{
|
|
title: '课程资源',
|
|
url: `/course/resources`,
|
|
icon: 'tabler:books',
|
|
},
|
|
{
|
|
title: 'AI 备课',
|
|
url: `/course/prep`,
|
|
icon: 'tabler:clipboard-list',
|
|
isExternal: true,
|
|
},
|
|
{
|
|
title: 'AI 教科研',
|
|
url: `/course/research`,
|
|
icon: 'tabler:report-search',
|
|
isExternal: true,
|
|
},
|
|
],
|
|
},
|
|
]
|
|
</script>
|
|
|
|
<template>
|
|
<div class="w-full min-h-screen flex font-sans">
|
|
<SidebarProvider style="--sidebar-width: 200px">
|
|
<AppSidebar
|
|
v-if="!route.meta.hideSidebar"
|
|
:nav="sidebarNav"
|
|
/>
|
|
<SidebarInset>
|
|
<AppTopbar
|
|
:hide-trigger="route.meta.hideSidebar"
|
|
:breadcrumbs
|
|
/>
|
|
<div class="flex flex-1 flex-col gap-4">
|
|
<slot />
|
|
</div>
|
|
</SidebarInset>
|
|
</SidebarProvider>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped></style>
|