feat(theme): 全面完善暖色系双主题动态适配,优化同城组局品类筛选与试听条防折行规范
这个提交包含在:
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
在新工单中引用
屏蔽一个用户