Files
workspace/code/link56/link56-frontend-new/src/router/index.ts
T
2025-12-11 17:31:05 +08:00

26 lines
530 B
TypeScript

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)
}