feat: 最新动态列支持图片展示 — 纯文字/纯图片/图文混合三种模式
后端: ProductResponse 新增 latest_record_has_images
前端: 📷图标 + 纯图片时显示"图片记录" + Tooltip标注[含图片]
This commit is contained in:
@ -403,10 +403,13 @@ export default function AdminTasksPage() {
|
||||
{/* 最新动态 */}
|
||||
<div className="col-span-2 text-xs">
|
||||
{p.latest_record_time ? (
|
||||
<Tooltip title={p.latest_record_content || ""}>
|
||||
<Tooltip title={(p.latest_record_content || "") + (p.latest_record_has_images ? " [含图片]" : "")}>
|
||||
<div className="cursor-default">
|
||||
<div className="text-[10px] text-gray-400">{new Date(p.latest_record_time).toLocaleString("zh-CN", { month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit" })}</div>
|
||||
<div className="mt-0.5 truncate text-[11px] text-gray-600">{p.latest_record_content || "—"}</div>
|
||||
<div className="mt-0.5 flex items-center gap-1 truncate text-[11px] text-gray-600">
|
||||
{p.latest_record_has_images && <span className="shrink-0">📷</span>}
|
||||
<span className="truncate">{p.latest_record_content || (p.latest_record_has_images ? "图片记录" : "—")}</span>
|
||||
</div>
|
||||
</div>
|
||||
</Tooltip>
|
||||
) : <span className="text-gray-300">—</span>}
|
||||
|
||||
@ -20,6 +20,7 @@ export interface ProductResponse {
|
||||
created_at: string;
|
||||
latest_record_time: string | null;
|
||||
latest_record_content: string | null;
|
||||
latest_record_has_images: boolean;
|
||||
}
|
||||
|
||||
/** MOM 物料选项 */
|
||||
|
||||
Reference in New Issue
Block a user