diff --git a/examples/components/Form/Mode.jsx b/examples/components/Form/Mode.jsx index fab73311..b63b4066 100644 --- a/examples/components/Form/Mode.jsx +++ b/examples/components/Form/Mode.jsx @@ -263,7 +263,8 @@ export default { mode: 'inline', placeholder: '请输入邮箱地址', label: '邮箱', - size: 'full' + size: 'full', + columnClassName: 'v-bottom' }, { type: 'password', @@ -293,7 +294,8 @@ export default { label: '密码', placeholder: '请输入密码', mode: 'inline', - size: 'full' + size: 'full', + columnClassName: 'v-bottom' } ] }, diff --git a/scss/_utilities.scss b/scss/_utilities.scss index c02c7c6c..54011865 100644 --- a/scss/_utilities.scss +++ b/scss/_utilities.scss @@ -1324,11 +1324,21 @@ } } +.v-top { + vertical-align: top !important; + align-self: flex-start; +} + .v-middle { vertical-align: middle !important; align-self: center; } +.v-bottom { + vertical-align: bottom !important; + align-self: flex-end; +} + .scrollable { overflow-x: hidden; overflow-y: auto; diff --git a/scss/components/form/_form.scss b/scss/components/form/_form.scss index 612b1546..845088c6 100644 --- a/scss/components/form/_form.scss +++ b/scss/components/form/_form.scss @@ -30,9 +30,6 @@ .#{$ns}Form-star { color: $red; font-size: $fontSizeXs; - position: absolute; - left: px2rem(-6px); - top: px2rem(3px); line-height: 1; } @@ -89,6 +86,12 @@ &--normal { > .#{$ns}Form-label { display: block; + + .#{$ns}Form-star { + position: absolute; + left: px2rem(-6px); + top: px2rem(3px); + } } } @@ -202,6 +205,12 @@ > .#{$ns}Form-label { padding-top: $Form-label-paddingTop; margin-bottom: 0; + + .#{$ns}Form-star { + position: absolute; + left: px2rem(-6px); + top: px2rem(3px); + } } .#{$ns}Form-itemColumn--xs {