feat: 聊天室前端布局

This commit is contained in:
陈淳
2024-04-02 18:41:41 +08:00
parent 3bfe4b6980
commit 887ea275f6
3 changed files with 95 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import Layout from "../layout/Index.vue";
import NotFound from "../views/error/404.vue";
import LoginLayout from "../layout/LoginLayout.vue";
import ActivityLayout from "../layout/activity/Index.vue";
import ChatLayout from "../layout/ChatLayout.vue"
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
scrollBehavior(to, from, savedPosition) {
@@ -140,6 +141,24 @@ const router = createRouter({
},
],
},
{
path: "/chat",
name: "chat",
component: ChatLayout,
redirect: "/chat/main",
children: [
{
name: "main",
path: "main",
component: () => import("../views/chathub/Index.vue"),
meta: {
title: "聊天室",
},
}
],
},
{ path: "/:pathMatch(.*)*", name: "NotFound", component: NotFound },
],
});