feat(student): 添加学生详情页及相关路由和跳转按钮
- 在 class.vue 中增加“详情”按钮,可跳转至对应学生详情页 - 使用 vue-router 的 useRouter 实现页面跳转功能 - 添加 /student/:id 路由,绑定学生详情组件 student.vue - 新增 student.vue 组件,展示学生详细信息 - 精简 Header.vue, 移除多余导航链接,优化界面展示
This commit is contained in:
@@ -3,6 +3,7 @@ import Uploadpng from '@/pages/uploadpng.vue'
|
||||
import LearningPlan from '@/pages/LearningPlan.vue'
|
||||
import Class from '@/pages/class.vue'
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import Student from '@/pages/student.vue'
|
||||
|
||||
// 统一在这里声明所有路由
|
||||
const routes = [
|
||||
@@ -26,6 +27,13 @@ const routes = [
|
||||
meta: { // meta 信息
|
||||
title: '学案' // 页面标题
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/student/:id', // 路由地址
|
||||
component: Student, // 对应组件
|
||||
meta: { // meta 信息
|
||||
title: '学生详情' // 页面标题
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user