refactor(portal): 优化主CTA视觉形态为居中轻量悬浮胶囊,告别厚重通栏横条
这个提交包含在:
@@ -167,3 +167,25 @@ test('5. 多语言文案解析与主客态映射审查', () => {
|
||||
'访客态顶栏操作必须映射 card.exchange 词条'
|
||||
);
|
||||
});
|
||||
|
||||
test('6. 主 CTA 悬浮胶囊形态与呼吸感视觉规范审查', () => {
|
||||
const content = fs.readFileSync(portalUvuePath, 'utf-8');
|
||||
assert.ok(
|
||||
content.includes('border-radius: var(--oc-radius-pill, 9999px);') ||
|
||||
content.includes('border-radius: 9999px;'),
|
||||
'primary-cta-btn 必须使用胶囊 Pill 圆角 (9999px) 替代沉重矩形'
|
||||
);
|
||||
assert.ok(
|
||||
content.includes('max-width: 220px') || content.includes('min-width: 150px'),
|
||||
'primary-cta-btn 严禁撑满全屏,必须使用精致收窄胶囊尺寸'
|
||||
);
|
||||
assert.ok(
|
||||
content.includes('.portal-cta-bar') && content.includes('pointer-events: none;'),
|
||||
'portal-cta-bar 容器必须开启 pointer-events: none 以实现居中悬浮呼吸感'
|
||||
);
|
||||
assert.ok(
|
||||
content.includes('.primary-cta-btn') && content.includes('pointer-events: auto;'),
|
||||
'primary-cta-btn 自身必须显式开启 pointer-events: auto'
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户