feat: 开发中...

This commit is contained in:
2023-04-03 17:24:21 +08:00
parent d1054590cd
commit e2bdd6a674
29 changed files with 386 additions and 218 deletions

View File

@@ -0,0 +1,33 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import router from '@/router';
import type { BlogInfoResponseVO } from '@/swagger';
import { api } from '@/api';
const blogInfo = ref<BlogInfoResponseVO>()
onMounted(() => {
const blogID = router.currentRoute.value.params?.id?.toString() || "1"
if (blogID) {
api.BlogController.getBlogInfo(parseInt(blogID))
.then(resp => {
const vo = resp.data
blogInfo.value = vo.data || {}
})
}
})
</script>
<template>
<h1 class="blog-title">{{ blogInfo?.title }}</h1>
<div class="blog-content" v-html="blogInfo?.content"></div>
</template>
<style scoped>
.blog-title {
text-align: center;
}
.blog-content {}
</style>