优化时间展示

This commit is contained in:
yml
2026-05-23 01:56:16 +08:00
parent c9db34ddda
commit 744f572f6c
17 changed files with 85 additions and 24 deletions
@@ -3,6 +3,7 @@ import { Search } from '@element-plus/icons-vue'
import { computed, onMounted, reactive, ref } from 'vue'
import { fetchAdminListings, type Listing } from '@/api/listings'
import { formatDateTime } from '@/utils/time'
const loading = ref(false)
const listings = ref<Listing[]>([])
@@ -152,8 +153,12 @@ function reviewType(status: string) {
<el-tag :type="reviewType(row.review_status)">{{ row.review_status }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="published_at" label="上架时间" min-width="180" />
<el-table-column prop="updated_at" label="更新时间" min-width="180" />
<el-table-column label="上架时间" min-width="180">
<template #default="{ row }">{{ formatDateTime(row.published_at) }}</template>
</el-table-column>
<el-table-column label="更新时间" min-width="180">
<template #default="{ row }">{{ formatDateTime(row.updated_at) }}</template>
</el-table-column>
<el-table-column label="操作" width="110">
<template #default="{ row }">
<RouterLink :to="`/admin/listings/${row.id}`">