fix(Table): style value should support CSS var (#50355)

* fix(Table): zIndex value should support CSS var

* fix: fix
This commit is contained in:
lijianan 2024-08-11 15:05:47 +08:00 committed by GitHub
parent 0c97a6fa43
commit dab9ab69d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -481,6 +481,8 @@ export const prepareComponentToken: GetDefaultToken<'Table'> = (token) => {
};
};
const zIndexTableFixed = 2;
// ============================== Export ==============================
export default genStyleHooks(
'Table',
@ -522,8 +524,6 @@ export default genStyleHooks(
calc,
} = token;
const zIndexTableFixed: number = 2;
const tableToken = mergeToken<TableToken>(token, {
tableFontSize: cellFontSize,
tableBg: colorBgContainer,
@ -551,7 +551,7 @@ export default genStyleHooks(
tableSelectedRowBg: rowSelectedBg,
tableSelectedRowHoverBg: rowSelectedHoverBg,
zIndexTableFixed,
zIndexTableSticky: zIndexTableFixed + 1,
zIndexTableSticky: calc(zIndexTableFixed).add(1).equal(),
tableFontSizeMiddle: cellFontSizeMD,
tableFontSizeSmall: cellFontSizeSM,
tableSelectionColumnWidth: selectionColumnWidth,

View File

@ -61,7 +61,7 @@ const genSelectionStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
},
[`table tr th${componentCls}-selection-column${componentCls}-cell-fix-left`]: {
zIndex: token.zIndexTableFixed + 1,
zIndex: calc(token.zIndexTableFixed).add(1).equal(),
},
[`table tr th${componentCls}-selection-column::after`]: {