import type { App } from 'vue' import { createRouter, createWebHashHistory } from 'vue-router' import Layout from '@/layout/index.vue' const router = createRouter({ history: createWebHashHistory(), strict: true, routes: [ { path: '/', component: Layout, children: [ { path: '/', component: () => import('@/views/home/index.vue'), }, ], }, ], scrollBehavior: () => ({ left: 0, top: 0 }), }) export function setupRouter(app: App) { app.use(router) }