feat: 重构部分代码,略微完成文章md渲染部分

This commit is contained in:
539943419 committed 2025-01-12 23:31:37 +08:00
1 parent 6be2c9a0d7
commit c2be826bc5
12 files changed
+200 -11

No files matched your search

+4 -4
View File
@@ -2,7 +2,7 @@
<div class="posts-wrapper">
<article class="posts-item" v-for="post in postsData" :key="post.id">
<header class="post-title">
<a href="">{{ post.title }}</a>
<nuxt-link :to="`/posts/post-${post.id}`">{{ post.title }}</nuxt-link>
</header>
<p class="post-summary">{{ post.summary }}...</p>
<footer class="post-footer">
@@ -32,10 +32,10 @@ const postsData = ref<postItem[]>([])
onMounted(async () => {
// router.push('/posts/temp')
await sleep(1000)
postsData.value = await $fetch('/api/posts/getPosts')
// await sleep(1000)
postsData.value = await $fetch('/api/posts/getPostList')
isInit.value = true
console.log(postsData.value)
// console.log(postsData.value)
})
</script>