mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
add question display page
This commit is contained in:
24
src/components/QuestionItems.vue
Normal file
24
src/components/QuestionItems.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { QAInfo } from '@/api/api-models'
|
||||
import { NCard, NDivider, NFlex, NImage, NList, NListItem, NTag, NText, NTime, NTooltip } from 'naive-ui'
|
||||
import QuestionItem from './QuestionItem.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
questions: QAInfo[]
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NList bordered>
|
||||
<NListItem v-for="item in questions" :key="item?.id">
|
||||
<QuestionItem :item="item">
|
||||
<template #footer>
|
||||
<slot name="footer" :item="item"></slot>
|
||||
</template>
|
||||
<template #header-extra>
|
||||
<slot name="header-extra" :item="item"></slot>
|
||||
</template>
|
||||
</QuestionItem>
|
||||
</NListItem>
|
||||
</NList>
|
||||
</template>
|
||||
Reference in New Issue
Block a user