feat:更新博客评论模块

This commit is contained in:
2025-06-22 21:01:49 +08:00
parent b9c18375f5
commit b4e0d8ebc2
13 changed files with 366 additions and 277 deletions

View File

@@ -29,7 +29,7 @@
<span>-------------本文结束感谢您的阅读给个五星好评吧~~-------------</span>
</div>
<blog-comment-edit />
<blog-comment-edit :parent-id="0"/>
<blog-comment />
</div>
@@ -44,15 +44,19 @@ import 'md-editor-v3/lib/style.css'
import { useBlogStore } from '@/store/blog.ts'
import { getBasicBlog } from '@/utils/blog/blogUtil.ts'
import { useRoute } from 'vue-router'
import { onMounted } from 'vue'
import { computed, onMounted } from 'vue'
const blogStore = useBlogStore()
const route = useRoute()
const currentUrl = new URL(window.location.href)
const blogComment = computed(() => blogStore.getEmptyBlogComment())
onMounted(async () => {
await blogStore.queryBlogById(route.params.id as number)
const blogId = route.params.id as number
blogStore.currentBlogId = blogId
await blogStore.queryBlogById(blogId)
})
</script>