diff --git a/packages/components/table/src/table-body/styles-helper.ts b/packages/components/table/src/table-body/styles-helper.ts index 81a53f7464..263688074c 100644 --- a/packages/components/table/src/table-body/styles-helper.ts +++ b/packages/components/table/src/table-body/styles-helper.ts @@ -98,7 +98,7 @@ function useStyles(props: Partial>) { ) } classes.push(ns.e('cell')) - return classes.join(' ') + return classes.filter((className) => Boolean(className)).join(' ') } const getSpan = ( row: T, diff --git a/packages/components/table/src/table-header/style.helper.ts b/packages/components/table/src/table-header/style.helper.ts index e6479df422..357a9689dd 100644 --- a/packages/components/table/src/table-header/style.helper.ts +++ b/packages/components/table/src/table-header/style.helper.ts @@ -109,7 +109,7 @@ function useStyle(props: TableHeaderProps) { classes.push(ns.e('cell')) - return classes.join(' ') + return classes.filter((className) => Boolean(className)).join(' ') } return {