style(portal): 将主CTA重构为靠右侧纯正正圆图标FAB,释放全屏通透空间
这个提交包含在:
@@ -168,24 +168,25 @@ test('5. 多语言文案解析与主客态映射审查', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('6. 主 CTA 悬浮胶囊形态与呼吸感视觉规范审查', () => {
|
||||
test('6. 主 CTA 靠右侧图标形式与悬浮触控规范审查', () => {
|
||||
const content = fs.readFileSync(portalUvuePath, 'utf-8');
|
||||
assert.ok(
|
||||
content.includes('inset-inline-end: 16px') || content.includes('right: 16px'),
|
||||
'主 CTA 必须靠右侧布局 (inset-inline-end: 16px)'
|
||||
);
|
||||
assert.ok(
|
||||
content.includes('border-radius: 50%') ||
|
||||
content.includes('border-radius: var(--oc-radius-pill, 9999px);') ||
|
||||
content.includes('border-radius: 9999px;'),
|
||||
'primary-cta-btn 必须使用胶囊 Pill 圆角 (9999px) 替代沉重矩形'
|
||||
'主 CTA 必须使用圆形或大圆角图标形态'
|
||||
);
|
||||
assert.ok(
|
||||
content.includes('max-width: 220px') || content.includes('min-width: 150px'),
|
||||
'primary-cta-btn 严禁撑满全屏,必须使用精致收窄胶囊尺寸'
|
||||
content.includes('height: 48px') || content.includes('min-height: 44px'),
|
||||
'主 CTA 触控尺寸必须满足规范 (>= 44px)'
|
||||
);
|
||||
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'
|
||||
content.includes('env(safe-area-inset-bottom') && content.includes('var(--window-bottom'),
|
||||
'主 CTA 必须适配视口安全区与 TabBar 避让'
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户