From bfcf8aa8cd3899337a0a6a085f4afedeab558b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=9F=E8=B4=A4?= Date: Wed, 27 Mar 2024 17:37:26 +0800 Subject: [PATCH] feat(card): ProCard support colStyle --- packages/card/src/components/Card/index.tsx | 2 ++ packages/card/src/typing.ts | 1 + packages/components/CHANGELOG.md | 7 +------ packages/layout/CHANGELOG.md | 10 ++-------- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/packages/card/src/components/Card/index.tsx b/packages/card/src/components/Card/index.tsx index 88b1c0f4c733..5f72beb3fd53 100644 --- a/packages/card/src/components/Card/index.tsx +++ b/packages/card/src/components/Card/index.tsx @@ -42,6 +42,7 @@ const Card = React.forwardRef((props: CardProps, ref: any) => { collapsed: controlCollapsed, collapsible = false, collapsibleIconRender, + colStyle, defaultCollapsed = false, onCollapse, checked, @@ -170,6 +171,7 @@ const Card = React.forwardRef((props: CardProps, ref: any) => { paddingBlockStart: verticalGutter / 2, paddingBlockEnd: verticalGutter / 2, }), + ...colStyle, }} className={columnClassName} > diff --git a/packages/card/src/typing.ts b/packages/card/src/typing.ts index 99d78d25176b..5a130626c5d3 100644 --- a/packages/card/src/typing.ts +++ b/packages/card/src/typing.ts @@ -35,6 +35,7 @@ type CardPropsBase = { loading?: boolean | ReactNode; /** 栅格布局宽度,24 栅格,支持指定宽度或百分,需要支持响应式 colSpan={{ xs: 12, sm: 6 }} */ colSpan?: ColSpanType | Partial>; + colStyle?: React.CSSProperties; /** 栅格间距 */ gutter?: Gutter | Gutter[]; /** 操作按钮 */ diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 45a91418992a..7594ac717e35 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -1,16 +1,11 @@ # Change Log -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.6.52](https://github.com/ant-design/pro-components/compare/@ant-design/pro-components@2.6.51...@ant-design/pro-components@2.6.52) (2024-03-22) **Note:** Version bump only for package @ant-design/pro-components - - - - ## [2.6.51](https://github.com/ant-design/pro-components/compare/@ant-design/pro-components@2.6.50...@ant-design/pro-components@2.6.51) (2024-03-20) **Note:** Version bump only for package @ant-design/pro-components diff --git a/packages/layout/CHANGELOG.md b/packages/layout/CHANGELOG.md index 7edeab9b3b36..bdbe93dde129 100644 --- a/packages/layout/CHANGELOG.md +++ b/packages/layout/CHANGELOG.md @@ -1,18 +1,12 @@ # Change Log -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [7.18.0](https://github.com/ant-design/pro-components/compare/@ant-design/pro-layout@7.17.20...@ant-design/pro-layout@7.18.0) (2024-03-22) - ### Features -* ActionsContent support one dom ([8558d0e](https://github.com/ant-design/pro-components/commit/8558d0ee280595cf1bb39da383bcd3b10da7103b)) - - - - +- ActionsContent support one dom ([8558d0e](https://github.com/ant-design/pro-components/commit/8558d0ee280595cf1bb39da383bcd3b10da7103b)) ## [7.17.20](https://github.com/ant-design/pro-components/compare/@ant-design/pro-layout@7.17.19...@ant-design/pro-layout@7.17.20) (2024-03-15)