feat: 重构课程准备页面,更新导航结构并添加新页面
This commit is contained in:
parent
9e094896bc
commit
d81ec9a62b
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -1,7 +1,6 @@
|
||||
{
|
||||
"eslint.useFlatConfig": true,
|
||||
"prettier.bracketSameLine": true,
|
||||
"prettier.requireConfig": true,
|
||||
"prettier.semi": false,
|
||||
"prettier.singleAttributePerLine": true,
|
||||
"prettier.singleQuote": true
|
||||
|
@ -30,7 +30,7 @@ export const topbarNavDefaults = [
|
||||
},
|
||||
{
|
||||
title: 'AI 备课',
|
||||
to: '/course/prepare',
|
||||
to: '/course/prep/',
|
||||
icon: 'tabler:clipboard-list',
|
||||
},
|
||||
{
|
||||
|
@ -11,8 +11,6 @@ const {
|
||||
} = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
// const course = await getCourseDetail(id as string);
|
||||
|
||||
const {
|
||||
data: course,
|
||||
status: courseStatus,
|
||||
@ -73,6 +71,12 @@ onMounted(() => {
|
||||
router.replace(`/course/${id}/chapters`)
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => useRoute().fullPath, (newPath) => {
|
||||
if (newPath === `/course/${id}`) {
|
||||
router.replace(`/course/${id}/chapters`)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
26
pages/course/prep/config.ts
Normal file
26
pages/course/prep/config.ts
Normal file
@ -0,0 +1,26 @@
|
||||
export const nav = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
title: 'AI 教学设计',
|
||||
url: '/course/prep/teach',
|
||||
icon: 'tabler:calendar-cog',
|
||||
},
|
||||
{
|
||||
title: 'AI 课件设计',
|
||||
url: '/course/prep/deck',
|
||||
icon: 'tabler:book-2',
|
||||
},
|
||||
{
|
||||
title: 'AI 出题',
|
||||
url: '/course/prep/quiz',
|
||||
icon: 'tabler:notebook',
|
||||
},
|
||||
{
|
||||
title: '微视频制作',
|
||||
url: '/course/prep/test',
|
||||
icon: 'tabler:video',
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
15
pages/course/prep/deck.vue
Normal file
15
pages/course/prep/deck.vue
Normal file
@ -0,0 +1,15 @@
|
||||
<script lang="ts" setup>
|
||||
import { nav } from './config'
|
||||
|
||||
definePageMeta({
|
||||
requiresAuth: true,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppPageWithSidebar :sidebar-nav="nav">
|
||||
<h1>deck</h1>
|
||||
</AppPageWithSidebar>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
7
pages/course/prep/index.vue
Normal file
7
pages/course/prep/index.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
definePageMeta({
|
||||
redirect: {
|
||||
name: 'course-prep-teach',
|
||||
},
|
||||
})
|
||||
</script>
|
15
pages/course/prep/quiz.vue
Normal file
15
pages/course/prep/quiz.vue
Normal file
@ -0,0 +1,15 @@
|
||||
<script lang="ts" setup>
|
||||
import { nav } from './config'
|
||||
|
||||
definePageMeta({
|
||||
requiresAuth: true,
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppPageWithSidebar :sidebar-nav="nav">
|
||||
<h1>quiz</h1>
|
||||
</AppPageWithSidebar>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
19
pages/course/prep/teach.vue
Normal file
19
pages/course/prep/teach.vue
Normal file
@ -0,0 +1,19 @@
|
||||
<script lang="ts" setup>
|
||||
import { nav } from './config'
|
||||
|
||||
definePageMeta({
|
||||
requiresAuth: true,
|
||||
})
|
||||
|
||||
useHead({
|
||||
title: 'AI 教学设计 | 备课',
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppPageWithSidebar :sidebar-nav="nav">
|
||||
<h1>teach</h1>
|
||||
</AppPageWithSidebar>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
@ -1,47 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import { Settings } from 'lucide-vue-next'
|
||||
|
||||
definePageMeta({
|
||||
requiresAuth: true,
|
||||
})
|
||||
|
||||
const nav = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
title: 'AI 教案设计',
|
||||
url: '/test',
|
||||
icon: Settings,
|
||||
},
|
||||
{
|
||||
title: 'AI 案例设计',
|
||||
url: '/test',
|
||||
icon: 'tabler:settings',
|
||||
},
|
||||
{
|
||||
title: 'AI 课件设计',
|
||||
url: '/test',
|
||||
icon: 'tabler:settings',
|
||||
},
|
||||
{
|
||||
title: 'AI 出题',
|
||||
url: '/test',
|
||||
icon: 'tabler:settings',
|
||||
},
|
||||
{
|
||||
title: '微视频制作',
|
||||
url: '/test',
|
||||
icon: 'tabler:settings',
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppPageWithSidebar :sidebar-nav="nav">
|
||||
<h1>Prepare</h1>
|
||||
</AppPageWithSidebar>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
Loading…
Reference in New Issue
Block a user