2022-09-25 22:33:13 +00:00
|
|
|
<template>
|
|
|
|
<div class="border-t border-gray-300 px-4 py-5 sm:p-0">
|
|
|
|
<dl class="sm:divide-y sm:divide-gray-300">
|
|
|
|
<div v-for="(detail, i) in details" :key="i" class="py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
2022-10-07 02:54:09 +00:00
|
|
|
<dt class="text-sm font-medium text-base-content">
|
2022-09-25 22:33:13 +00:00
|
|
|
{{ detail.name }}
|
|
|
|
</dt>
|
2022-10-07 02:54:09 +00:00
|
|
|
<dd class="mt-1 text-sm text-base-content sm:col-span-2 sm:mt-0">
|
2022-09-25 22:33:13 +00:00
|
|
|
<slot :name="detail.slot || detail.name" v-bind="{ detail }">
|
|
|
|
<template v-if="detail.type == 'date'">
|
|
|
|
<DateTime :date="detail.text" />
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
{{ detail.text }}
|
|
|
|
</template>
|
|
|
|
</slot>
|
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import type { DateDetail, Detail } from "./types";
|
|
|
|
|
|
|
|
defineProps({
|
|
|
|
details: {
|
|
|
|
type: Object as () => (Detail | DateDetail)[],
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|