import {createRouter, createWebHashHistory} from 'vue-router'; import Layout from '@/layout/index.vue' const routes = [ { path: '/', name: 'Home', component: Layout, children: [ { path: '/', name: 'hello', component: () => import('@/components/HelloWorld.vue') }, { path: 'update', name: 'Update', component: () => import('@/views/update/index.vue') }, { path: 'mock', name: 'Mock', component: () => import('@/views/mock/index.vue') } ] } ] const router = createRouter({history: createWebHashHistory(), routes}) export default router