From 5784cffd0cc8e913fb3f95082249d50975e7f8bb Mon Sep 17 00:00:00 2001 From: zhouyun Date: Thu, 17 Oct 2024 20:57:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(drawer):=20=E4=BF=AE=E5=A4=8D=20width=20?= =?UTF-8?q?=E5=92=8C=20height=20=E7=B1=BB=E5=9E=8B=E4=B8=8D=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=AD=97=E7=AC=A6=E4=B8=B2=E9=97=AE=E9=A2=98=20(#3013?= =?UTF-8?q?)=20(#3016)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/fifty-snakes-invent.md | 6 ++++++ packages/ui/drawer/src/Drawer.tsx | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/fifty-snakes-invent.md diff --git a/.changeset/fifty-snakes-invent.md b/.changeset/fifty-snakes-invent.md new file mode 100644 index 000000000..53c1253e1 --- /dev/null +++ b/.changeset/fifty-snakes-invent.md @@ -0,0 +1,6 @@ +--- +"@hi-ui/drawer": patch +"@hi-ui/hiui": patch +--- + +fix(drawer): 修复 width 和 height 类型不支持字符串问题 (#3013) diff --git a/packages/ui/drawer/src/Drawer.tsx b/packages/ui/drawer/src/Drawer.tsx index 0d36ecc83..32c359fc6 100644 --- a/packages/ui/drawer/src/Drawer.tsx +++ b/packages/ui/drawer/src/Drawer.tsx @@ -162,11 +162,11 @@ export interface DrawerProps extends Omit, 'title'>, UseM /** * 自定义抽屉宽度,仅在 placement="left" | "right" 有效 */ - width?: number + width?: number | string /** * 自定义抽屉高度,仅在 placement="bottom" | "top" 有效 */ - height?: number + height?: number | string /** * 自定义css展示层级 */