From 79192df508a588e2a516ebc9476cefca5f60cdc3 Mon Sep 17 00:00:00 2001 From: youzi <2410633923@qq.com> Date: Tue, 30 Dec 2025 14:31:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8D=9A=E5=AE=A2=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=EF=BC=8C=E6=94=AF=E6=8C=81Markdown=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E5=92=8C=E6=96=87=E7=AB=A0=E8=AF=A6=E6=83=85=E9=A1=B5=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BE=E7=89=87=E6=87=92=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=92=8C=E7=80=91=E5=B8=83=E6=B5=81=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extra.d.ts | 4 +- package.json | 8 + src/api/blog/index.ts | 16 + src/api/file/index.ts | 3 +- src/icon/loading.svg | 17 + src/lib/components/LazyImg.vue | 16 +- src/lib/components/Waterfall.vue | 4 +- src/main.ts | 16 +- src/views/Blog.vue | 18 - src/views/Gallery.vue | 7 +- src/views/Plink.vue | 22 +- src/views/blog/[bid].vue | 51 + src/views/blog/index.vue | 34 + typed-router.d.ts | 9 +- yarn.lock | 3655 +++++++++++++++++++++++++++++- 15 files changed, 3827 insertions(+), 53 deletions(-) create mode 100644 src/api/blog/index.ts create mode 100644 src/icon/loading.svg delete mode 100644 src/views/Blog.vue create mode 100644 src/views/blog/[bid].vue create mode 100644 src/views/blog/index.vue diff --git a/extra.d.ts b/extra.d.ts index 5c58722..47418f6 100644 --- a/extra.d.ts +++ b/extra.d.ts @@ -3,4 +3,6 @@ declare module "vue3-video-play"; declare module "vue3-masonry-plus"; declare module "vite"; declare module "vue-devui/tag"; -declare module "vue-infinite-scroll"; \ No newline at end of file +declare module "@markdown-next/vue"; +declare module "@kangc/v-md-editor/lib/preview"; +declare module "@kangc/v-md-editor/lib/theme/github.js"; \ No newline at end of file diff --git a/package.json b/package.json index 237f03b..25692d5 100644 --- a/package.json +++ b/package.json @@ -15,12 +15,19 @@ }, "dependencies": { "@imengyu/vue3-context-menu": "^1.5.2", + "@kangc/v-md-editor": "^2.3.18", + "@markdown-next/parser": "^0.0.2-alpha", + "@markdown-next/vue": "^0.0.2-alpha", "@meting/core": "^1.5.13", "@unocss/reset": "^66.3.3", "aplayer": "^1.10.1", "axios": "^1.11.0", "es-toolkit": "^1.39.8", + "highlight.js": "^11.11.1", + "juejin-markdown-themes": "^1.34.0", "less": "^4.4.0", + "markdown-exit": "^1.0.0-beta.6", + "md-editor-v3": "^6.3.0", "pinia": "^3.0.3", "qweather-icons": "^1.7.0", "unocss": "^66.3.3", @@ -30,6 +37,7 @@ "v-infinite-scroll": "^1.0.4", "vite-svg-loader": "^5.1.0", "vue": "^3.6.0-alpha.2", + "vue-markdown": "^2.2.4", "vue-router": "^4.5.1", "vue3-cookies": "^1.0.6", "vue3-video-play": "^1.3.2" diff --git a/src/api/blog/index.ts b/src/api/blog/index.ts new file mode 100644 index 0000000..ee5573d --- /dev/null +++ b/src/api/blog/index.ts @@ -0,0 +1,16 @@ +import request from "@/util/request"; + +//getBlogList +export function getBlogList() { + return request({ + url: "/art", + method: "get", + }); +} +//getBlogDetail +export function getBlogDetail(id: string) { + return request({ + url: `/art/${id}`, + method: "get", + }); +} \ No newline at end of file diff --git a/src/api/file/index.ts b/src/api/file/index.ts index 43eb896..ed5906a 100644 --- a/src/api/file/index.ts +++ b/src/api/file/index.ts @@ -23,4 +23,5 @@ export function putShare(data: Record) { method: "put", data, }); -} \ No newline at end of file +} + diff --git a/src/icon/loading.svg b/src/icon/loading.svg new file mode 100644 index 0000000..6002111 --- /dev/null +++ b/src/icon/loading.svg @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/src/lib/components/LazyImg.vue b/src/lib/components/LazyImg.vue index e1591b2..e3bf4d6 100644 --- a/src/lib/components/LazyImg.vue +++ b/src/lib/components/LazyImg.vue @@ -1,8 +1,8 @@