feat(theme): 全面完善暖色系双主题动态适配,优化同城组局品类筛选与试听条防折行规范

这个提交包含在:
wikiboss
2026-09-16 20:20:25 +08:00
父节点 21549b1f13
当前提交 21792f10b3
共有 6 个文件被更改,包括 259 次插入 和 144 次删除

查看文件

@@ -71,4 +71,22 @@ describe('UI/UX 规范门禁 (TDD 测试套件: 全面杜绝系统 Emoji)', () =
}
});
});
describe('4. 首页卡片试听条单行防折行与文本截断规范校验', () => {
it('首页试听条必须配置单行不折行、弹性伸缩与省略号截断', () => {
const indexVuePath = path.join(uniPagesDir, 'index', 'index.vue');
const content = fs.readFileSync(indexVuePath, 'utf-8');
// 提取 .voice-bar 样式块
const voiceBarMatch = content.match(/\.voice-bar\s*\{([\s\S]*?)\n\s*\.card-footer/);
expect(voiceBarMatch).not.toBeNull();
const styleBlock = voiceBarMatch![1];
// 必须防止文字折行破坏胶囊造型
expect(styleBlock).toContain('white-space: nowrap');
expect(styleBlock).toContain('text-overflow: ellipsis');
expect(styleBlock).toContain('overflow: hidden');
expect(styleBlock).toContain('flex-shrink: 0');
});
});
});