fix: 到期时间列直接显示日期时间而非剩余天数

This commit is contained in:
2026-04-30 21:26:01 +08:00
parent 04d23d8c24
commit c5d1dc4b04
@@ -119,11 +119,13 @@ export function getColumns(actions: {
return h(Badge, { variant: 'destructive' }, () => t('developer.users.expiry.expired'))
}
const daysLeft = Math.ceil((date.getTime() - now.getTime()) / (1000 * 60 * 60 * 24))
return h('div', { class: 'flex flex-col' }, [
h('span', { class: 'text-green-600 font-medium' }, `${daysLeft} ${t('developer.users.expiry.daysLeft')}`),
h('span', { class: 'text-xs text-muted-foreground' }, date.toLocaleDateString('zh-CN')),
])
return h('span', {}, date.toLocaleString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
}))
}
catch {
return '-'