From c4e47fc2bd5da5e4524c66c77ef79837437f8a2c Mon Sep 17 00:00:00 2001 From: pany <939630029@qq.com> Date: Sat, 22 Feb 2025 16:26:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A9=BA=E7=A4=BA=E4=BE=8B=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home/components/Title.vue | 13 +++++++++++++ src/pages/home/index.vue | 19 ++++++++++++++----- src/router/index.ts | 7 +++++-- 3 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 src/pages/home/components/Title.vue diff --git a/src/pages/home/components/Title.vue b/src/pages/home/components/Title.vue new file mode 100644 index 0000000..4050c5a --- /dev/null +++ b/src/pages/home/components/Title.vue @@ -0,0 +1,13 @@ + + + + + {{ props.text }} + + diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue index f6bc25a..c3d5b68 100644 --- a/src/pages/home/index.vue +++ b/src/pages/home/index.vue @@ -1,16 +1,15 @@ - - 示例集合 - + - 🔥 更多优秀示例,期待你的 PR 👏🏻 + + + + + 🔥 更多优秀示例,期待你的 PR 👏🏻 diff --git a/src/router/index.ts b/src/router/index.ts index d4f4906..6b32fee 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -140,7 +140,10 @@ export const demoRoutes: RouteRecordRaw[] = [ } } } - }, + } +] + +export const emptyDemoRoutes: RouteRecordRaw[] = [ { path: "/i18n", component: () => import("@/pages/demo/i18n.vue"), @@ -160,7 +163,7 @@ export const demoRoutes: RouteRecordRaw[] = [ /** 路由实例 */ export const router = createRouter({ history: VITE_ROUTER_HISTORY === "hash" ? createWebHashHistory(VITE_PUBLIC_PATH) : createWebHistory(VITE_PUBLIC_PATH), - routes: [...systemRoutes, ...routes, ...demoRoutes] + routes: [...systemRoutes, ...routes, ...demoRoutes, ...emptyDemoRoutes] }) // 注册路由导航守卫