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展示层级 */