From 60f3aac99a3d168d4d94e760054a832be6b16468 Mon Sep 17 00:00:00 2001 From: merlin Date: Thu, 23 Oct 2025 16:15:27 +0800 Subject: [PATCH] fix: view --- src/router.js | 5 ++ src/store/details.js | 4 +- src/views/blog/articles.vue | 155 +++++++++++++++++++++++++++++++++ src/views/blog/blog.vue | 4 +- src/views/blog/show.vue | 25 ++++-- src/views/blog/viewDetails.vue | 34 ++------ 6 files changed, 186 insertions(+), 41 deletions(-) create mode 100644 src/views/blog/articles.vue diff --git a/src/router.js b/src/router.js index 18a8be1..5e44998 100644 --- a/src/router.js +++ b/src/router.js @@ -28,6 +28,11 @@ const router = createRouter({ name: "me", component: () => import("@/views/blog/me.vue"), }, + { + path: "/articles", + name: "articles", + component: () => import("@/views/blog/articles.vue"), + } ], }, { diff --git a/src/store/details.js b/src/store/details.js index 32bba99..31f93f6 100644 --- a/src/store/details.js +++ b/src/store/details.js @@ -75,7 +75,7 @@ export const projectStore = defineStore("project", { export const viewDetailsStore = defineStore("viewDetails", { state: () => ({ detail: { - a_id: "", + id: "", title: "", content: "", created: "", @@ -84,7 +84,7 @@ export const viewDetailsStore = defineStore("viewDetails", { }), actions: { setViewDetails(data) { - this.detail.a_id = data.a_id; + this.detail.id = data.id; this.detail.title = data.title; this.detail.content = data.content; this.detail.created = data.created; diff --git a/src/views/blog/articles.vue b/src/views/blog/articles.vue new file mode 100644 index 0000000..227fcac --- /dev/null +++ b/src/views/blog/articles.vue @@ -0,0 +1,155 @@ + + + diff --git a/src/views/blog/blog.vue b/src/views/blog/blog.vue index 4a2f3de..9629a47 100644 --- a/src/views/blog/blog.vue +++ b/src/views/blog/blog.vue @@ -5,7 +5,7 @@ 首页 - 文章 + 文章