From aee957b64dd970d192f038f30c6b8d6799394c08 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 25 Apr 2022 11:04:00 +0800 Subject: [PATCH] perf: improve page layout Signed-off-by: Ryan Wang --- src/layouts/FilledLayout.vue | 6 +++ src/router/routes.config.ts | 3 +- src/views/AboutView.vue | 4 +- src/views/HomeView.vue | 8 +-- src/views/posts/PostList.vue | 97 ++++++++++++++++++++++++++++++++++++ 5 files changed, 108 insertions(+), 10 deletions(-) create mode 100644 src/views/posts/PostList.vue diff --git a/src/layouts/FilledLayout.vue b/src/layouts/FilledLayout.vue index 48366dbc..9407114d 100644 --- a/src/layouts/FilledLayout.vue +++ b/src/layouts/FilledLayout.vue @@ -21,8 +21,14 @@ import logo from "@/assets/logo.svg"; diff --git a/src/router/routes.config.ts b/src/router/routes.config.ts index 2a6a5190..243d822a 100644 --- a/src/router/routes.config.ts +++ b/src/router/routes.config.ts @@ -1,6 +1,7 @@ import type { RouteRecordRaw } from "vue-router"; import HomeView from "../views/HomeView.vue"; import AboutView from "../views/AboutView.vue"; +import PostList from "../views/posts/PostList.vue"; export const routes: Array = [ { @@ -16,7 +17,7 @@ export const routes: Array = [ { path: "/posts", name: "Posts", - component: AboutView, + component: PostList, children: [ { path: "/posts/categories", diff --git a/src/views/AboutView.vue b/src/views/AboutView.vue index feda57e7..6bf69e58 100644 --- a/src/views/AboutView.vue +++ b/src/views/AboutView.vue @@ -8,8 +8,8 @@ const route = useRoute(); diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 4de87555..d444c758 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,12 +1,6 @@ diff --git a/src/views/posts/PostList.vue b/src/views/posts/PostList.vue new file mode 100644 index 00000000..5eff544a --- /dev/null +++ b/src/views/posts/PostList.vue @@ -0,0 +1,97 @@ + + + +