diff --git a/components/form/style/index.less b/components/form/style/index.less index 0b5fb638..3d9d06a1 100644 --- a/components/form/style/index.less +++ b/components/form/style/index.less @@ -2,7 +2,6 @@ @import '../../style/mixins/index'; @import './mixin.less'; - @form-cls: ~'@{cls-prefix}-form'; @form-item-cls: ~'@{cls-prefix}-form-item'; @form-item-label-cls: ~'@{form-item-cls}-label'; @@ -21,18 +20,20 @@ @form-item-height: @data-input-height-base; - // 表单布局: horizontal .@{form-cls} { .default(); .text(); - + width: 100%; margin: @form-margin; font-size: @form-size-base; - // 对齐方式: 左对齐 + // 对齐方式: 左对齐 .@{form-item-cls} { + .default(); + .text(); + display: flex; margin-bottom: @form-item-margin; padding: @form-margin; @@ -65,7 +66,7 @@ min-height: @form-item-height; } } - // 对齐方式: 右对齐 + // 对齐方式: 右对齐 .@{form-item-cls}-right .@{form-item-label-cls} { justify-content: flex-end; } @@ -85,7 +86,7 @@ // 表单布局: inline .@{form-cls}-inline { display: grid; - grid-gap: (@form-item-margin/2); + grid-gap: (@form-item-margin / 2); // 默认情况下,将一行分割为 24 格, formItem 自定义占几格【默认6格】 grid-template-columns: repeat(24, minmax(0, 1fr)); align-items: center; @@ -105,7 +106,7 @@ } .@{form-cls} { - // formItem 必填样式 + // formItem 必填样式 .@{form-item-cls} { .@{form-item-label-cls}.@{form-item-required} { &::before { @@ -127,4 +128,4 @@ color: var(--f-danger-color); font-size: @form-size-error; line-height: 1; -} \ No newline at end of file +}