he wei
2025-03-17 280792acd3dae2f6f04e08e51dcad91e8ea5562c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import Layout from "@/layout/index.vue";
 
const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Layout,
      redirect: '/home',
      children: [
        {
          path: '/home',
          component: ()=>import('@/views/home/index.vue'),
          name: 'HomeView',
          meta: {title: '首页'}
        }
      ],
    },
 
  ],
})
 
export default router