R44: 账号详情信息卡字段对齐——抖音号/赛道等跨行 grid 列轨道共享(同视频详情方案),修复抖音号长短致作品数与AI制作错位;css ac→ad、data-pages ae→af
This commit is contained in:
1 parent
bc762d73cd
commit
7ad8cf4e1f
4 files changed
+19
-7
No files matched your search
@@ -445,3 +445,13 @@
|
||||
- **视觉留档**:`tmp/shot-r42-persona2.png`(深链 `#/account/2/persona/2` 直开=视频列表第2页完整还原)
|
||||
- **坑**:Page.navigate 多次 SIGTERM——截图脚本改用纯 hash 切换避免;首次冒烟需先 Page.navigate 强刷使新版 data-pages 入 DOM 再断言
|
||||
- **commit 049d37a 已 push origin/main**(52a5058..049d37a)
|
||||
|
||||
## R44 账号详情信息字段跨行对齐(09-03 19:10)
|
||||
- **需求**:「账号详情中 抖音号 和 赛道 内容的宽度保持一致,现在抖音号内容有长有短 导致作品数和AI制作错位了」
|
||||
- **根因**:账号信息卡用两个独立 `.info-row` flex 容器(行1=抖音号/作品数/获取视频,行2=赛道/AI制作/粉丝/获赞),各行按内容宽度左排 + gap 80px——抖音号长则「作品数」被顶到右侧,而赛道短「AI制作」靠左,跨行第 2 列 x 起点不一致 = 视觉错位
|
||||
- **修复**:套用 09-02 视频详情已验证的同款 grid 方案——`panel` 改单容器 `.account-info .account-grid`,**grid-template-columns: repeat(4, minmax(min-content, max-content)) + grid-template-areas: 'a b c .' 'd e f g' 'h h h h'** 列轨道跨行共享(首列=抖音号↔赛道同宽、b列=作品数↔AI制作严格对齐);infoGrid 增第 5 参 area(内联 grid-area:a~h);wide「账号定位」= h 区
|
||||
- **改动**:data-pages.js(infoGrid 签名 + panel 段);style.css 新增 `.account-info .account-grid` 2 行(areas 模板 + item min-width:0)
|
||||
- **版本**:style.css ac→ad、data-pages.js ae→af
|
||||
- **CDP 冒烟** `tmp/r44-align.mjs`(9225)**10/10 PASS**(账号 2 Ricardo1999,抖音号英文长 ID):account-grid 8 字段 ✓ / 抖音号.left=赛道.left=40.7 ✓ / 作品数.left=AI制作.left=353.2 ✓ / 获取视频.left=粉丝.left=665.7 ✓ / 首列格宽 抖音号=赛道=232.5px ✓ / 第2列格宽一致 ✓ / 字段内容非空 ✓
|
||||
- **坑**:冒烟首次 FAIL 全因页面停在旧资源(ac/ae)——须先 Page.navigate ignoreCache 强刷新版再断言(页面 hash 直跳不换 index.html)
|
||||
- **commit 未推送**(待收尾)
|
||||
@@ -957,7 +957,7 @@ async function renderAccountDetail(view, id) {
|
||||
if (tab === 'info' && persona === null) await loadPersona(); // 账号设定内联在信息页,首屏即加载(与视频数据并行)
|
||||
if (tab === 'persona' && trendData === null) await loadTrend(); // 视频列表页首屏拉全量趋势数据(与分页数据并行)
|
||||
const dv = await dvP;
|
||||
const infoGrid = (label, val, wide, raw) => `<div class="info-item ${wide ? 'info-wide' : ''}"><div class="info-label">${label}</div><div class="info-value">${raw ? val : esc(fmt(val))}</div></div>`;
|
||||
const infoGrid = (label, val, wide, raw, area) => `<div class="info-item ${wide ? 'info-wide' : ''}"${area ? ` style="grid-area:${area}"` : ''}><div class="info-label">${label}</div><div class="info-value">${raw ? val : esc(fmt(val))}</div></div>`;
|
||||
const rows = (dv.items || []).map((v) => `<tr>
|
||||
${bstate.batch ? `<td class="cb-cell"><input type="checkbox" class="batch-cb" data-id="${v.id}"></td>` : ''}
|
||||
<td class="td-pub">${fmt(v.publish_time)}</td>
|
||||
@@ -1009,10 +1009,8 @@ async function renderAccountDetail(view, id) {
|
||||
: '-';
|
||||
// 账号定位:默认最多 4 行,可点击展开/收起
|
||||
const contentHtml = `<span class="clamp-wrap"><span class="clamp-text" data-clamp>${esc(contentText) || '-'}</span>${contentText.length > 120 ? `<button class="clamp-btn" data-clamp-toggle>展开</button>` : ''}</span>`;
|
||||
panel = `<div class="info-card">
|
||||
<div class="info-row">${infoGrid('抖音号', dyHtml, false, true)}${infoGrid('作品数', acc.works_count)}${infoGrid('获取视频', dv.total)}</div>
|
||||
<div class="info-row">${infoGrid('赛道', acc.track)}${infoGrid('AI制作', acc.is_ai === '是' ? '是' : '否')}${infoGrid('粉丝', acc.followers)}${infoGrid('获赞', acc.total_likes)}</div>
|
||||
<div class="info-row">${infoGrid('账号定位', contentHtml, true, true)}</div>
|
||||
panel = `<div class="info-card account-info">
|
||||
<div class="account-grid">${infoGrid('抖音号', dyHtml, false, true, 'a')}${infoGrid('作品数', acc.works_count, false, false, 'b')}${infoGrid('获取视频', dv.total, false, false, 'c')}${infoGrid('赛道', acc.track, false, false, 'd')}${infoGrid('AI制作', acc.is_ai === '是' ? '是' : '否', false, false, 'e')}${infoGrid('粉丝', acc.followers, false, false, 'f')}${infoGrid('获赞', acc.total_likes, false, false, 'g')}${infoGrid('账号定位', contentHtml, true, true, 'h')}</div>
|
||||
</div>
|
||||
<h3 class="video-list-title">账号设定</h3>
|
||||
${personaPanel()}`;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>MCN热点雷达</title>
|
||||
<link rel="stylesheet" href="style.css?v=20260903ac">
|
||||
<link rel="stylesheet" href="style.css?v=20260903ad">
|
||||
<script src="vendor/echarts.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -42,6 +42,6 @@
|
||||
</div>
|
||||
|
||||
<script src="app.js?v=20260903y"></script>
|
||||
<script src="data-pages.js?v=20260903ae"></script>
|
||||
<script src="data-pages.js?v=20260903af"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -520,6 +520,10 @@ td.td-title { max-width: 240px; }
|
||||
.info-row { display: flex; flex-wrap: wrap; gap: 10px 80px; }
|
||||
.info-row .info-item { flex: 0 0 auto; min-width: 100px; }
|
||||
.info-row + .info-row { margin-top: 10px; }
|
||||
/* 账号信息字段对齐(09-03 R44):与视频详情同款解法——抖音号/作品数/获取视频 与 赛道/AI制作/粉丝/获赞 同处一个 grid,
|
||||
列轨道跨行共享(a列=抖音号与赛道同宽,b列=作品数与AI制作严格对齐);原独立 .info-row 各行按内容宽排,抖音号长短会把「作品数」顶偏造成跨行错位 */
|
||||
.account-info .account-grid { display: grid; grid-template-columns: repeat(4, minmax(min-content, max-content)); grid-template-areas: 'a b c .' 'd e f g' 'h h h h'; gap: 10px 80px; justify-content: start; }
|
||||
.account-info .account-grid .info-item { min-width: 0; }
|
||||
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 18px; }
|
||||
.info-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
||||
.info-wide { grid-column: 1/-1; }
|
||||
|
||||
Reference in new issue
Block a user