Files
yunhai-agent-front/src/router/index.ts
T
2026-10-12 14:45:00 +08:00

24 lines
633 B
TypeScript

import { createRouter, createWebHashHistory } from "vue-router";
import type { RouteRecordRaw } from "vue-router";
/**
* 智能助手路由:单页应用,唯一入口为对话页。
* 用 hash 模式:产物部署在 /{contextPath}/front/ 下,无需服务端 rewrite 规则。
*/
const routes: RouteRecordRaw[] = [
{
path: "/",
name: "chat",
component: () => import("@/views/Chat.vue"),
meta: { title: "智能助手" },
},
{ path: "/:pathMatch(.*)*", redirect: "/" },
];
const router = createRouter({
history: createWebHashHistory(),
routes,
});
export default router;