- Updated Container.vue to import SubNavItem from Secondary.vue and renamed component usage. - Removed NavMain.vue and NavUser.vue components, consolidating sidebar functionality. - Deleted Sidebar.vue and created a new sidebar structure in index.vue. - Implemented new Main.vue and User.vue components under sidebar/nav for better organization. - Added DPlayer for video playback in preview page and adjusted layout accordingly. - Introduced new course Card.vue component for displaying course information. - Created Secondary.vue for secondary navigation with improved styling and functionality. - Updated package.json to include dplayer and its types for video handling.
30 lines
707 B
Vue
30 lines
707 B
Vue
<script lang="ts" setup>
|
|
import type { SubNavItem } from '../nav/Secondary.vue'
|
|
|
|
defineProps<{ subnavs?: SubNavItem[] }>()
|
|
</script>
|
|
|
|
<template>
|
|
<div class="flex flex-1 flex-col p-8 page-bg-gradient">
|
|
<!-- <h1 class="pl-2 text-xl font-medium">外部标题</h1> -->
|
|
<slot name="subnav">
|
|
<NavSecondary
|
|
v-if="subnavs && subnavs.length"
|
|
:navs="subnavs"
|
|
/>
|
|
</slot>
|
|
<div
|
|
class="bg-white h-full rounded-lg shadow-sm p-8 dark:bg-neutral-900 z-20"
|
|
>
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.page-bg-gradient {
|
|
@apply bg-gradient-to-br from-[#D5DEF9]/50 to-[#D6C9F9]/50;
|
|
@apply dark:from-[#36477A]/50 dark:to-[#7C6DA6]/50;
|
|
}
|
|
</style>
|