From 7fc7e2c1a8c0daa6df77bf01864c262a14df3cc6 Mon Sep 17 00:00:00 2001 From: zhouyun1 Date: Mon, 4 Mar 2024 14:57:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(form):=20=E4=BF=AE=E5=A4=8D=E6=A8=AA?= =?UTF-8?q?=E5=90=91=E8=A1=A8=E5=8D=95=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98=20(#2756)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/flat-parrots-smoke.md | 5 +++++ .changeset/many-bees-deliver.md | 5 +++++ packages/ui/form/src/FormLabel.tsx | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .changeset/flat-parrots-smoke.md create mode 100644 .changeset/many-bees-deliver.md diff --git a/.changeset/flat-parrots-smoke.md b/.changeset/flat-parrots-smoke.md new file mode 100644 index 000000000..834ebdf40 --- /dev/null +++ b/.changeset/flat-parrots-smoke.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/form": patch +--- + +fix: 修复横向表单错误提示样式问题 diff --git a/.changeset/many-bees-deliver.md b/.changeset/many-bees-deliver.md new file mode 100644 index 000000000..bb43dad5f --- /dev/null +++ b/.changeset/many-bees-deliver.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +fix(form): 修复横向表单错误提示样式问题 diff --git a/packages/ui/form/src/FormLabel.tsx b/packages/ui/form/src/FormLabel.tsx index 8d03a96ac..704741da4 100644 --- a/packages/ui/form/src/FormLabel.tsx +++ b/packages/ui/form/src/FormLabel.tsx @@ -46,7 +46,9 @@ export const FormLabel = forwardRef((prop return { labelWidth, - controlWidth: `calc(100% - ${labelWidth}px)`, + controlWidth: isNumeric(labelWidth) + ? `calc(100% - ${labelWidth}px)` + : `calc(100% - ${labelWidth})`, } }, [labelPlacement, labelWidthProp])