From 3dc8c155674bb8d702187cc4a33e684d22f04bf6 Mon Sep 17 00:00:00 2001 From: zhouyun1 Date: Tue, 28 May 2024 19:50:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(form):=20=E4=BF=AE=E5=A4=8D=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E9=A1=B6=E5=AF=B9=E9=BD=90=E6=97=B6=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#2838)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/mighty-onions-occur.md | 5 +++++ .changeset/real-insects-vanish.md | 5 +++++ packages/ui/form/src/styles/form.scss | 1 - .../ui/form/stories/label-placement.stories.tsx | 13 +++++++++---- 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 .changeset/mighty-onions-occur.md create mode 100644 .changeset/real-insects-vanish.md diff --git a/.changeset/mighty-onions-occur.md b/.changeset/mighty-onions-occur.md new file mode 100644 index 000000000..05f959ce8 --- /dev/null +++ b/.changeset/mighty-onions-occur.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/form": patch +--- + +fix: 修复标签顶对齐时样式问题 diff --git a/.changeset/real-insects-vanish.md b/.changeset/real-insects-vanish.md new file mode 100644 index 000000000..956e2de31 --- /dev/null +++ b/.changeset/real-insects-vanish.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +fix(form): 修复标签顶对齐时样式问题 diff --git a/packages/ui/form/src/styles/form.scss b/packages/ui/form/src/styles/form.scss index 29de8bebf..086fbc7c8 100644 --- a/packages/ui/form/src/styles/form.scss +++ b/packages/ui/form/src/styles/form.scss @@ -72,7 +72,6 @@ $prefix: '#{$component-prefix}-form' !default; } .#{$prefix}-label--placement-top > .#{$prefix}-label__content > & { - height: 22px; min-height: 22px; line-height: 22px; padding-right: 0; diff --git a/packages/ui/form/stories/label-placement.stories.tsx b/packages/ui/form/stories/label-placement.stories.tsx index c1d59ba3b..fa316976e 100644 --- a/packages/ui/form/stories/label-placement.stories.tsx +++ b/packages/ui/form/stories/label-placement.stories.tsx @@ -35,7 +35,7 @@ export const LabelPlacement = () => { { - console.log('Get form value:', formRef.current.getFieldsValue()) + console.log('Get form value:', formRef.current?.getFieldsValue()) }} > 提交 @@ -65,7 +65,7 @@ export const LabelPlacement = () => { { - console.log('Get form value:', formRef.current.getFieldsValue()) + console.log('Get form value:', formRef.current?.getFieldsValue()) }} > 提交 @@ -88,14 +88,19 @@ export const LabelPlacement = () => { - + { - console.log('Get form value:', formRef.current.getFieldsValue()) + console.log('Get form value:', formRef.current?.getFieldsValue()) }} > 提交