🐛 fix(tabs): 恢复活动标签顶部强调条

- 恢复 V2 工作区活动标签顶部绿色强调条
- 保留标签四角圆角与顶部伪元素屏蔽逻辑
- 更新活动标签视觉回归断言
This commit is contained in:
AutumnNazi
2026-07-26 20:35:07 +08:00
parent fb0b2fe7c7
commit b2f2dff6fd
2 changed files with 7 additions and 3 deletions

View File

@@ -52,12 +52,12 @@ describe('v2 workbench adaptive tab width', () => {
);
});
it('rounds all four corners without drawing an accent bar above the active tab', () => {
it('rounds all four corners and highlights the active tab from within its border', () => {
expect(themeSource).toMatch(
/\.gn-v2-main-tabs \.ant-tabs-tab \{[^}]*border-radius: 8px !important;/s,
);
expect(themeSource).not.toMatch(
/\.gn-v2-main-tabs \.ant-tabs-tab\.ant-tabs-tab-active \{[^}]*box-shadow:/s,
expect(themeSource).toMatch(
/\.gn-v2-main-tabs \.ant-tabs-tab\.ant-tabs-tab-active \{[^}]*box-shadow: inset 0 2px 0 var\(--gn-accent\) !important;/s,
);
expect(themeSource).toMatch(
/\.gn-v2-main-tabs \.ant-tabs-tab\.ant-tabs-tab-active::after \{[^}]*display: none;/s,

View File

@@ -3713,6 +3713,10 @@ body[data-ui-version="v2"] .gn-v2-main-tabs .ant-tabs-tab {
border-radius: 8px !important;
}
body[data-ui-version="v2"] .gn-v2-main-tabs .ant-tabs-tab.ant-tabs-tab-active {
box-shadow: inset 0 2px 0 var(--gn-accent) !important;
}
body[data-ui-version="v2"] .gn-v2-main-tabs .ant-tabs-tab.ant-tabs-tab-active::after {
display: none;
}