From b3d7c77593e6400e91e92c99e74882a60916b408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E8=B6=85?= Date: Thu, 19 Jun 2025 17:18:03 +0800 Subject: [PATCH] fix(design): [table] nested table with expanded table display stripe style --- packages/design/src/table/style/index.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/design/src/table/style/index.ts b/packages/design/src/table/style/index.ts index 1d126e908..d4c22c072 100644 --- a/packages/design/src/table/style/index.ts +++ b/packages/design/src/table/style/index.ts @@ -265,6 +265,20 @@ export const genTableStyle = (token: TableToken): CSSObject => { [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: { marginLeft: token.margin + token.lineWidth * 2, }, + // 为嵌套内表格设置斑马纹 + [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: { + [`${componentCls}-tbody`]: { + // 斑马纹样式 + [`tr:nth-child(2n + 1):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${antCls}-descriptions-row) > td`]: + { + backgroundColor: colorBgBase, + }, + [`tr:nth-child(2n):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${componentCls}-expanded-row):not(${antCls}-descriptions-row) > td`]: + { + backgroundColor: colorFillQuaternary, + }, + }, + }, }, }, [`${componentCls}-middle, ${componentCls}-small`]: {