feat: 列名支持展示更新时间
This commit is contained in:
@@ -6,9 +6,9 @@ import { Pencil, Trash2 } from 'lucide-react'
|
|||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
|
|
||||||
// 列宽定义,header 和 row 必须保持一致。用 grid-template-columns 统一控制。
|
// 列宽定义,header 和 row 必须保持一致。用 grid-template-columns 统一控制。
|
||||||
// 序号 | 图片 | 答案 | 谐音梗 | 提示 | 创建时间 | 评分 | 操作
|
// 序号 | 图片 | 答案 | 谐音梗 | 提示 | 创建时间 | 更新时间 | 评分 | 操作
|
||||||
export const GRID_TEMPLATE =
|
export const GRID_TEMPLATE =
|
||||||
'minmax(60px,60px) minmax(120px,120px) minmax(80px,1fr) minmax(100px,1fr) minmax(160px,2fr) minmax(100px,100px) minmax(110px,110px) minmax(100px,100px)'
|
'minmax(60px,60px) minmax(120px,120px) minmax(80px,1fr) minmax(100px,1fr) minmax(160px,2fr) minmax(110px,110px) minmax(110px,110px) minmax(110px,110px) minmax(100px,100px)'
|
||||||
|
|
||||||
interface LevelRowProps {
|
interface LevelRowProps {
|
||||||
level: Level
|
level: Level
|
||||||
@@ -91,6 +91,15 @@ export function LevelRow({ level, index, onEdit, onDelete }: LevelRowProps) {
|
|||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
{/* 更新时间 */}
|
||||||
|
<span className="text-muted-foreground whitespace-nowrap">
|
||||||
|
{new Date(level.updatedAt).toLocaleDateString('zh-CN', {
|
||||||
|
year: 'numeric',
|
||||||
|
month: '2-digit',
|
||||||
|
day: '2-digit',
|
||||||
|
})}
|
||||||
|
</span>
|
||||||
|
|
||||||
{/* 评分 */}
|
{/* 评分 */}
|
||||||
<span className="text-xs text-muted-foreground whitespace-nowrap">
|
<span className="text-xs text-muted-foreground whitespace-nowrap">
|
||||||
{level.difficultyScore != null || level.funScore != null
|
{level.difficultyScore != null || level.funScore != null
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ const HEADER_COLUMNS = [
|
|||||||
'谐音梗',
|
'谐音梗',
|
||||||
'提示',
|
'提示',
|
||||||
'创建时间',
|
'创建时间',
|
||||||
|
'更新时间',
|
||||||
'评分',
|
'评分',
|
||||||
'操作',
|
'操作',
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user