feat: 开发中...
This commit is contained in:
33
blog-frontend/src/views/BlogEditView.vue
Normal file
33
blog-frontend/src/views/BlogEditView.vue
Normal 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>
|
Reference in New Issue
Block a user