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 @@