Skip to content

Commit

Permalink
improve(design): middle and small Table empty height
Browse files Browse the repository at this point in the history
  • Loading branch information
dengfuping committed Jan 17, 2025
1 parent dc55ff2 commit 0941a1d
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion packages/design/src/table/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const genTableStyle = (token: TableToken): CSSObject => {
borderBottom: 'none',
},
[`${componentCls}-empty-wrapper`]: {
minHeight: 360,
minHeight: 360 - token.paddingSM * 2,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
Expand All @@ -116,6 +116,24 @@ export const genTableStyle = (token: TableToken): CSSObject => {
},
},

// middle 表格样式
[`${componentCls}-wrapper ${componentCls}${componentCls}-middle`]: {
[`${componentCls}-tbody`]: {
[`${componentCls}-empty-wrapper`]: {
minHeight: 260 - token.paddingXS * 2,
},
},
},

// small 表格样式
[`${componentCls}-wrapper ${componentCls}${componentCls}-small`]: {
[`${componentCls}-tbody`]: {
[`${componentCls}-empty-wrapper`]: {
minHeight: 160 - token.paddingXXS * 2,
},
},
},

// 滚动表格样式
// 由于滚动表格会在 tbody 下最前面多一个 tr 元素,因此需要设置相反的斑马条样式
// .ant-table-scroll-horizontal: 水平滚动
Expand Down

0 comments on commit 0941a1d

Please sign in to comment.