feat: init wechat
This commit is contained in:
27
frontend/wechat/src/views/ArticleDetail.vue
Normal file
27
frontend/wechat/src/views/ArticleDetail.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const article = ref(null)
|
||||
|
||||
onMounted(async () => {
|
||||
// TODO: Implement API call to fetch article details
|
||||
const { id } = route.params
|
||||
article.value = { id, title: '文章标题', content: '文章内容' }
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="article-detail p-3">
|
||||
<Button icon="pi pi-arrow-left" @click="router.back()" class="p-button-text mb-3" />
|
||||
|
||||
<div v-if="article">
|
||||
<h1>{{ article.title }}</h1>
|
||||
<div class="content mt-3">
|
||||
{{ article.content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user