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])