添加基地概况,科学研究页面
This commit is contained in:
@@ -1,23 +1,61 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import { createRouter, createWebHistory , createWebHashHistory} from 'vue-router'
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
import AboutView from '@/views/AboutView.vue';
|
||||
|
||||
import BaseOverview from '@/views/BaseOverview.vue';
|
||||
import ScientificResearch from '@/views/ScientificResearch.vue';
|
||||
import AcademicExchange from '@/views/AcademicExchange.vue';
|
||||
import SocialService from '@/views/SocialService.vue';
|
||||
import CaseResources from '@/views/CaseResources.vue';
|
||||
import HomeContent from '@/views/HomeContent.vue';
|
||||
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
history: createWebHashHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: HomeView,
|
||||
children: [
|
||||
{
|
||||
path: '', // ✅ 默认子路由:访问 / 时显示首页内容
|
||||
name: 'home-content',
|
||||
component: HomeContent
|
||||
},
|
||||
{
|
||||
path: 'base-overview',
|
||||
name: 'BaseOverview',
|
||||
component: BaseOverview
|
||||
},
|
||||
{
|
||||
path: 'scientific-research',
|
||||
name: 'ScientificResearch',
|
||||
component: ScientificResearch
|
||||
},
|
||||
{
|
||||
path: 'academic-exchange',
|
||||
name: 'AcademicExchange',
|
||||
component: AcademicExchange
|
||||
},
|
||||
{
|
||||
path: 'social-service',
|
||||
name: 'SocialService',
|
||||
component: SocialService
|
||||
},
|
||||
{
|
||||
path: 'case-resources',
|
||||
name: 'CaseResources',
|
||||
component: CaseResources
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'about',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (About.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import('../views/AboutView.vue'),
|
||||
},
|
||||
],
|
||||
component: AboutView
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
Reference in New Issue
Block a user