Files
AI-interview-web/src/router/index.js

51 lines
1.2 KiB
JavaScript
Raw Normal View History

2025-09-08 17:31:33 +08:00
import { createRouter, createWebHistory } from 'vue-router';
import Layout from '../layout/Layout.vue';
const routes = [
{
path: '/',
component: Layout,
children: [
{
path: '',
name: 'Dashboard',
component: () => import('../views/Dashboard.vue'),
},
{
path: 'interview',
name: 'Interview',
component: () => import('../views/InterviewView.vue'),
},
{
path: 'question-bank',
name: 'QuestionBank',
component: () => import('../views/QuestionBank.vue'),
},
{
path: 'history',
name: 'InterviewHistory',
component: () => import('../views/InterviewHistory.vue'),
},
{
path: 'report/:sessionId',
name: 'InterviewReport',
component: () => import('../views/InterviewReport.vue'),
props: true, // 将路由参数作为props传递给组件
},
{
path: 'answer-record',
name: 'AnswerRecord',
component: () => import('../views/AnswerRecord.vue'),
},
],
},
];
const router = createRouter({
history: createWebHistory(),
routes,
});
export default router;