diff --git a/tonecn/package.json b/tonecn/package.json index 4aec70e..4ee3908 100644 --- a/tonecn/package.json +++ b/tonecn/package.json @@ -12,6 +12,9 @@ }, "dependencies": { "axios": "^1.6.8", + "highlight.js": "^11.10.0", + "marked": "^14.1.0", + "marked-highlight": "^2.1.4", "vue": "^3.4.21", "vue-router": "^4.3.0" }, diff --git a/tonecn/src/router/index.ts b/tonecn/src/router/index.ts index 73f8dea..3630f42 100644 --- a/tonecn/src/router/index.ts +++ b/tonecn/src/router/index.ts @@ -24,6 +24,11 @@ const router = createRouter({ name: 'blog', component: () => import('../views/Blog.vue') }, + { + path: '/blogContent/:uuid', + name: 'blogContent', + component: () => import('../views/BlogContent.vue'), + }, { path: '/console', name: 'console', diff --git a/tonecn/src/views/BlogContent.vue b/tonecn/src/views/BlogContent.vue new file mode 100644 index 0000000..89be949 --- /dev/null +++ b/tonecn/src/views/BlogContent.vue @@ -0,0 +1,149 @@ + + + + + 加载中,请稍后... + + + + {{ blogInfo.title }} + 发布于 {{ + timestampToString(blogInfo.publish_time) }} + + + + + + + \ No newline at end of file
发布于 {{ + timestampToString(blogInfo.publish_time) }}