账号信息精简:去掉简介行,账号定位收起改4行
- data-pages.js:info tab 删除「简介」info-row - style.css:.clamp-text max-height 240px→96px(4行),展开按钮阈值 200→120
This commit is contained in:
1 parent
4473f159e5
commit
dd15f12b58
3 files changed
+9
-5
No files matched your search
@@ -50,3 +50,8 @@
|
||||
- 加载逻辑:persona 数据从「点击 persona tab 时才加载」改为「info tab 首屏即加载」(`if (tab==='info' && persona===null) await loadPersona()`,与视频数据并行 dvP/await 拆分);tab 点击处理器去掉冗余 persona 加载
|
||||
- **验证**:bindPager/bindBatchBar 均用 querySelectorAll/空值守卫,容器缺元素不报错;data-rewrite(AI创作)点击时仍 `if (!persona) await loadPersona()` 兜底;data-extract 绑定全局查找在 info tab 同样生效
|
||||
- 服务未重启(纯静态资源),重开页面 `?v=20260902#/account/1629`(旧梦留声机)验证
|
||||
|
||||
## 账号信息精简(10:53,用户要求)
|
||||
- **需求**:「账号信息 不显示 简介,账号定位 改为收起时 显示4行」
|
||||
- **修改**:① data-pages.js info tab 删除「简介」info-row;② style.css `.clamp-text` max-height 240px→96px(=4行×15px×1.6),展开按钮阈值 length>200→>120(与 4 行匹配)
|
||||
- 重开 `?v=20260902-b#/account/1629` 验证
|
||||
@@ -435,12 +435,11 @@ async function renderAccountDetail(view, id) {
|
||||
let panel = '';
|
||||
if (tab === 'info') {
|
||||
const contentText = String(acc.content || '');
|
||||
// 账号定位:默认最多 10 行,可点击展开/收起
|
||||
const contentHtml = `<span class="clamp-wrap"><span class="clamp-text" data-clamp>${esc(contentText) || '-'}</span>${contentText.length > 200 ? `<button class="clamp-btn" data-clamp-toggle>展开</button>` : ''}</span>`;
|
||||
// 账号定位:默认最多 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('抖音号', acc.douyin_id)}${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('简介', acc.bio, true)}</div>
|
||||
<div class="info-row">${infoGrid('账号定位', contentHtml, true, true)}</div>
|
||||
</div>
|
||||
<h3 class="video-list-title">账号设定</h3>
|
||||
|
||||
@@ -386,9 +386,9 @@ td.td-title { max-width: 240px; }
|
||||
/* 视频ID 限宽(09-02):长数字不把第一行撑爆,多余省略号 + hover 提示全量 */
|
||||
.video-info .info-item.vid-limited { max-width: 220px; }
|
||||
.video-info .info-item.vid-limited .info-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
/* 长文本默认最多 10 行,可点击展开/收起(账号定位等) */
|
||||
/* 长文本默认最多 4 行,可点击展开/收起(账号定位等) */
|
||||
/* 09-01 改用 block+max-height 裁剪:display:-webkit-box 下长句不折行,内容宽被撑到 1896px 导致 main 横向滚动条 */
|
||||
.clamp-text { display: block; max-height: 240px; overflow: hidden; word-break: break-word; overflow-wrap: anywhere; } /* 240px=10行×15px×1.6 */
|
||||
.clamp-text { display: block; max-height: 96px; overflow: hidden; word-break: break-word; overflow-wrap: anywhere; } /* 96px=4行×15px×1.6 */
|
||||
.clamp-text.open { max-height: none; }
|
||||
.clamp-btn { border: none; background: none; color: #4a90e2; cursor: pointer; font-size: 13px; padding: 2px 0; }
|
||||
.clamp-btn:hover { text-decoration: underline; }
|
||||
|
||||
Reference in new issue
Block a user