chore: 重构路由和视图,移除旧的标签页并添加新的布局和页面

This commit is contained in:
2025-12-11 13:25:56 +07:00
parent 508275403a
commit d2b796e434
5 changed files with 31 additions and 27 deletions

View File

@@ -1,31 +1,31 @@
import type { RouteRecordRaw } from "vue-router";
import { createRouter, createWebHistory } from "@ionic/vue-router";
import TabsPage from "../views/TabsPage.vue";
import Layout from "@/components/layout/default.vue";
const routes: Array<RouteRecordRaw> = [
{
path: "/",
redirect: "/tabs/tab1",
redirect: "/layout/home",
},
{
path: "/tabs/",
component: TabsPage,
path: "/layout/",
component: Layout,
children: [
{
path: "",
redirect: "/tabs/tab1",
redirect: "/layout/home",
},
{
path: "tab1",
component: () => import("@/views/Tab1Page.vue"),
path: "home",
component: () => import("@/views/home/index.vue"),
},
{
path: "tab2",
component: () => import("@/views/Tab2Page.vue"),
path: "market",
component: () => import("@/views/market/index.vue"),
},
{
path: "tab3",
component: () => import("@/views/Tab3Page.vue"),
path: "user",
component: () => import("@/views/user/index.vue"),
},
],
},