chore: 重构路由和视图,移除旧的标签页并添加新的布局和页面
This commit is contained in:
@@ -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"),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user