BUG fix: NaN

This commit is contained in:
KUN1007 2023-12-02 14:49:42 +08:00
parent 74c3bc7034
commit 98ec677b42

View file

@ -1,4 +1,5 @@
<script setup lang="ts">
import { computed } from 'vue'
import UserPart from './UserPart.vue'
import TopicPart from './TopicPart.vue'
@ -7,14 +8,16 @@ import { HomeTopic } from '@/api'
const props = defineProps<{
topic: HomeTopic
}>()
const topic = computed(() => props.topic)
</script>
<template>
<div class="topic">
<UserPart :user="props.topic.user" />
<UserPart :user="topic.user" />
<RouterLink :to="`/topic/${props.topic.tid}`">
<TopicPart :topic="props.topic" />
<RouterLink :to="`/topic/${topic.tid}`">
<TopicPart :topic="topic" />
</RouterLink>
</div>
</template>