From bc599f924b68ebbb5d5dd5cc53a03a0446763ebb Mon Sep 17 00:00:00 2001 From: jidekin <294297426@qq.com> Date: Fri, 23 Oct 2026 15:41:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(users):=20=E8=B5=84=E4=BA=A7=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E6=96=87=E5=AD=97=E5=8E=8B=E5=8F=A0=20+=20=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E5=9B=BE=E7=89=87=E6=94=B9=E4=B8=BA=E5=8F=8B=E5=A5=BD?= =?UTF-8?q?=E5=8D=A0=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .asset-grid 由 flex(固定 150px) 改为 grid(minmax 170px),.asset-cell 加 min-width:0 - 缩略图 width:100% + aspect-ratio 4/3;元信息行加 ellipsis;下载按钮贴底 - el-image 加 #error 插槽:过期签名 CDN 链接显示「链接已失效」而非「加载失败」整块 - 版本 2.9.9 → 2.9.10 --- CHANGELOG.md | 18 ++++++++++++++++++ app/main.py | 2 +- frontend/src/locales/en.ts | 1 + frontend/src/locales/zh.ts | 1 + frontend/src/views/Users.vue | 36 ++++++++++++++++++++++++++++-------- 5 files changed, 49 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2de9913..55ab401 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # CHANGELOG +## 2026-10-23 · 用户管理资产卡片的文字压叠修复(2.9.9 → 2.9.10) + +老板截图反馈:用户管理展开账号后,图像/视频资产的「标题 / 模型·时间 / 下载按钮」全都压叠在一起。 + +**根因**:`.asset-grid` 是 `display: flex` + `.asset-cell { width: 150px }` —— +flex 子项默认 `flex-shrink: 1`,卡片被挤压后宽度趋近于 0,卡片内的文字与按钮就**互相压叠**。 + +**修复**: +- 栅格改成 `display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr))`, + 宽度由栅格决定,不再依赖固定 px。 +- `.asset-cell` 加 `min-width: 0`(grid/flex 子项溢出压叠的经典解法); + 改成纵向 flex,下载按钮 `margin-top: auto` 贴底对齐。 +- 缩略图 `width: 100%; aspect-ratio: 4/3`(原来是固定 150×110)。 +- 元信息行 `overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%`。 +- **顺带修「加载失败」**:部分资产的 CDN 直链带过期签名(`?UCloudPublicKey=…`), + 图源本身已失效 —— 给 `el-image` 加了 `#error` 插槽,显示「链接已失效」占位, + 不再是一大块刺眼的「加载失败」。 + ## 2026-10-23 · 调用日志列表加「缓存命中」列(2.9.8 → 2.9.9) 老板:「调用日志的命中缓存率为什么一直都是 0」。 diff --git a/app/main.py b/app/main.py index fe62cd0..e0ba879 100644 --- a/app/main.py +++ b/app/main.py @@ -355,7 +355,7 @@ _docs_on = config.server.docs_enabled # 安全默认关(report: /docs、/ope # 2026-09-30: 2.6.1 → 2.7.0(按老板要求整个删除「火山方舟 Coding Plan」供应商:配置/模型/代码/文档/前端下拉/环境变量全清)。 # 2026-09-30: 2.7.0 → 2.7.1(界面提示白话化:熔断器→供应商自动保护、引擎→运行环境、slug→标识;删 120 个未引用死键)。 # ★ 版本号纪律:每次改动都要往上加,小改动加小版本号、大改动加大版本号(README 有专章)。 -VERSION = "2.9.9" +VERSION = "2.9.10" app = FastAPI( title="API Gateway", diff --git a/frontend/src/locales/en.ts b/frontend/src/locales/en.ts index b99a977..2b86b63 100644 --- a/frontend/src/locales/en.ts +++ b/frontend/src/locales/en.ts @@ -258,6 +258,7 @@ export default { dlOk: 'Download started', dlFail: 'Download failed: {msg}', dlNoSrc: 'This record has no downloadable URL yet', + imgExpired: 'Link expired', }, chat: { newChat: 'New chat', diff --git a/frontend/src/locales/zh.ts b/frontend/src/locales/zh.ts index 83b1594..03ada73 100644 --- a/frontend/src/locales/zh.ts +++ b/frontend/src/locales/zh.ts @@ -258,6 +258,7 @@ export default { dlOk: '已开始下载', dlFail: '下载失败:{msg}', dlNoSrc: '这条记录还没有可下载的地址', + imgExpired: '链接已失效', }, chat: { newChat: '新建对话', diff --git a/frontend/src/views/Users.vue b/frontend/src/views/Users.vue index 4e33754..032f8c8 100644 --- a/frontend/src/views/Users.vue +++ b/frontend/src/views/Users.vue @@ -34,7 +34,11 @@
+ :preview-src-list="act(row.name).images.map((x: any) => x.src).filter(Boolean)" :initial-index="0" preview-teleported> + +
{{ im.prompt || '—' }}
{{ im.served || im.model || '' }} · {{ fmtClock((im.ts || 0) / 1000) }}