mirror of
https://github.com/Kisechan/Mainpage.git
synced 2025-07-10 07:07:18 +00:00
add
This commit is contained in:
@ -1,8 +1,17 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import Home from '@/views/Home.vue' // 确保路径正确
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
|
||||
const routes = [
|
||||
{ path: '/', component: Home } // 确保根路径指向 Home 组件
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: HomeView
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'about',
|
||||
component: () => import('../views/AboutView.vue')
|
||||
}
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
|
Reference in New Issue
Block a user