2021-09-14 15:15:39 +08:00
|
|
|
|
@use 'sass:math';
|
2020-12-22 12:39:33 +08:00
|
|
|
|
|
2019-04-30 11:11:25 +08:00
|
|
|
|
.#{$ns}Form {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
font-size: var(--Form-fontSize);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
2021-04-09 09:17:50 +08:00
|
|
|
|
// 一般是快速编辑里的最后一个输入框
|
|
|
|
|
&--quickEdit > div:last-of-type {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--inline {
|
2021-06-07 10:09:55 +08:00
|
|
|
|
> .#{$ns}Button {
|
|
|
|
|
margin-bottom: calc(var(--Form-item-gap) / 2);
|
|
|
|
|
margin-right: calc(var(--Form-item-gap) / 2);
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}PlainField {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: inline-block;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
padding-top: var(--Form-input-paddingY);
|
|
|
|
|
// padding-bottom: var(--Form-input-paddingY);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-06-10 17:47:47 +08:00
|
|
|
|
.#{$ns}Form-static {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
min-height: var(--Form-input-height);
|
|
|
|
|
padding-top: var(--Form-label-paddingTop);
|
|
|
|
|
padding-bottom: var(--Form-label-paddingTop);
|
2020-06-10 17:47:47 +08:00
|
|
|
|
margin-bottom: 0;
|
2020-10-24 17:53:46 +08:00
|
|
|
|
|
|
|
|
|
.#{$ns}Form-item--inline > .#{$ns}Form-value > & {
|
|
|
|
|
display: inline-block;
|
2020-10-24 18:02:35 +08:00
|
|
|
|
vertical-align: top;
|
2020-10-24 17:53:46 +08:00
|
|
|
|
}
|
2021-10-11 11:24:51 +08:00
|
|
|
|
|
|
|
|
|
&--borderFull {
|
|
|
|
|
border: var(--Form-input-borderWidth) solid var(--Form-input-borderColor);
|
|
|
|
|
border-radius: var(--Form-input-borderRadius);
|
|
|
|
|
padding: var(--Form-input-paddingY) var(--Form-input-paddingX);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&--borderHalf {
|
|
|
|
|
border-bottom: var(--Form-input-borderWidth) solid
|
|
|
|
|
var(--Form-input-borderColor);
|
|
|
|
|
border-radius: var(--Form-input-borderRadius);
|
|
|
|
|
padding: var(--Form-input-paddingY) var(--Form-input-paddingX);
|
|
|
|
|
}
|
2020-06-10 17:47:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-04-30 11:11:25 +08:00
|
|
|
|
.#{$ns}Form-label {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
font-weight: var(--fontWeightNormal);
|
2021-04-08 23:19:23 +08:00
|
|
|
|
margin-bottom: var(--gap-xs);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
position: relative;
|
2022-01-05 11:32:11 +08:00
|
|
|
|
font-size: var(--Form-item-fontSize);
|
|
|
|
|
color: var(--Form-item-fontColor);
|
2019-05-15 16:10:20 +08:00
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> span {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-star {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
color: var(--danger);
|
|
|
|
|
font-size: var(--fontSizeXs);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
line-height: 1;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-feedback {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
color: var(--danger);
|
|
|
|
|
margin: var(--Form-input-marginBottom) 0 0;
|
|
|
|
|
padding-left: var(--gap-base);
|
|
|
|
|
font-size: var(--fontSizeSm);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-description {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: block;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
color: var(--Form-description-color);
|
|
|
|
|
margin: var(--Form-input-marginBottom) 0 0;
|
|
|
|
|
font-size: var(--Form-description-fontSize);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-hint {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: inline-block;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
margin-left: var(--gap-sm);
|
|
|
|
|
padding-top: var(--Form-input-paddingY);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
vertical-align: top;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-item {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
margin-bottom: var(--Form-item-gap);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2021-08-10 20:33:18 +08:00
|
|
|
|
&:last-child {
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
.#{$ns}Grid-form > &:last-child {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
.#{$ns}Form--inline > &--inline {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
&:last-child {
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
margin-bottom: 0;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-remark {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
padding-top: var(--Form-label-paddingTop);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
vertical-align: top;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2020-10-24 18:02:35 +08:00
|
|
|
|
&--inline {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
margin-bottom: calc(var(--Form-item-gap) / 2);
|
|
|
|
|
margin-right: calc(var(--Form-item-gap) / 2);
|
2020-10-24 18:02:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
&--horizontal {
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}Form-label {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
text-align: var(--Form--horizontal-label-align);
|
|
|
|
|
white-space: var(--Form--horizontal-label-whiteSpace);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
&--normal {
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}Form-label {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: block;
|
2020-06-09 20:28:07 +08:00
|
|
|
|
|
|
|
|
|
.#{$ns}Form-star {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: px2rem(-6px);
|
|
|
|
|
top: px2rem(3px);
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
&.is-error > .#{$ns}Form-label {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
color: var(--danger);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-placeholder {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
color: var(--Form-input-placeholderColor);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-03-25 20:26:10 +08:00
|
|
|
|
.#{$ns}Form-caption {
|
|
|
|
|
display: inline-block;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
line-height: var(--Form-input-height);
|
|
|
|
|
height: var(--Form-input-height);
|
2020-03-25 20:26:10 +08:00
|
|
|
|
margin-left: px2rem(10px);
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-30 11:11:25 +08:00
|
|
|
|
@include media-breakpoint-up(sm) {
|
2020-11-01 12:24:39 +08:00
|
|
|
|
.#{$ns}Form-label {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-control--sizeXs {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
// min-width: var(--Form-control-widthXs);
|
2019-12-06 22:24:02 +08:00
|
|
|
|
// width: auto;
|
2021-09-18 13:14:18 +08:00
|
|
|
|
width: var(--Form-control-widthXs);
|
2019-12-06 22:24:02 +08:00
|
|
|
|
max-width: 100%;
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: top;
|
2020-04-03 10:38:36 +08:00
|
|
|
|
|
|
|
|
|
// 非常难受,number 类型的 input 不能设置size
|
|
|
|
|
&.#{$ns}NumberControl {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
width: var(--Form-control-widthXs);
|
2020-04-03 10:38:36 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-control--sizeSm {
|
2021-09-18 13:14:18 +08:00
|
|
|
|
width: var(--Form-control-widthSm);
|
2019-12-06 22:24:02 +08:00
|
|
|
|
max-width: 100%;
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: top;
|
2020-04-03 10:38:36 +08:00
|
|
|
|
|
|
|
|
|
// 非常难受,number 类型的 input 不能设置size
|
|
|
|
|
&.#{$ns}NumberControl {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
width: var(--Form-control-widthSm);
|
2020-04-03 10:38:36 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-control--sizeMd {
|
2021-09-18 13:14:18 +08:00
|
|
|
|
width: var(--Form-control-widthMd);
|
2019-12-06 22:24:02 +08:00
|
|
|
|
max-width: 100%;
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-control--sizeLg {
|
2021-09-18 13:14:18 +08:00
|
|
|
|
width: var(--Form-control-widthLg);
|
2019-12-06 22:24:02 +08:00
|
|
|
|
max-width: 100%;
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: top;
|
2020-04-03 10:38:36 +08:00
|
|
|
|
|
|
|
|
|
// 非常难受,number 类型的 input 不能设置size
|
|
|
|
|
&.#{$ns}NumberControl {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
width: var(--Form-control-widthLg);
|
2020-04-03 10:38:36 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-item {
|
|
|
|
|
&--horizontal {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
margin-left: calc(var(--Form--horizontal-gutterWidth) / 2 * -1);
|
|
|
|
|
margin-right: calc(var(--Form--horizontal-gutterWidth) / 2 * -1);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> * {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
padding-left: calc(var(--Form--horizontal-gutterWidth) / 2);
|
|
|
|
|
padding-right: calc(var(--Form--horizontal-gutterWidth) / 2);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}Form-value {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
flex-basis: 0;
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
max-width: 100%;
|
2021-08-26 23:11:15 +08:00
|
|
|
|
min-width: 0;
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-itemColumn--xs,
|
|
|
|
|
.#{$ns}Form-itemColumn--sm,
|
|
|
|
|
.#{$ns}Form-itemColumn--normal,
|
2020-11-01 11:58:21 +08:00
|
|
|
|
.#{$ns}Form-itemColumn--auto,
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-itemColumn--md,
|
|
|
|
|
.#{$ns}Form-itemColumn--lg {
|
|
|
|
|
flex-grow: unset;
|
|
|
|
|
flex-basis: unset;
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}Form-label {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
padding-top: var(--Form-label-paddingTop);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
margin-bottom: 0;
|
2021-08-17 20:48:59 +08:00
|
|
|
|
flex-shrink: 0;
|
2020-06-09 20:28:07 +08:00
|
|
|
|
|
|
|
|
|
.#{$ns}Form-star {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: px2rem(-6px);
|
|
|
|
|
top: px2rem(3px);
|
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-itemColumn--xs {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
width: var(--Form--horizontal-label-widthXs);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-itemColumn--sm {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
width: var(--Form--horizontal-label-widthSm);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-itemColumn--normal {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
width: var(--Form--horizontal-label-widthBase);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-itemColumn--md {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
width: var(--Form--horizontal-label-widthMd);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-itemColumn--lg {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
width: var(--Form--horizontal-label-widthLg);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2020-11-01 11:58:21 +08:00
|
|
|
|
.#{$ns}Form-itemColumn--auto {
|
|
|
|
|
width: auto;
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
@for $i from (1) through $Form--horizontal-columns {
|
|
|
|
|
.#{$ns}Form-itemColumn--#{$i} {
|
2021-09-14 15:15:39 +08:00
|
|
|
|
flex: 0 0 percentage(math.div($i, $Form--horizontal-columns));
|
|
|
|
|
max-width: percentage(math.div($i, $Form--horizontal-columns));
|
2019-11-26 19:04:47 +08:00
|
|
|
|
min-height: 1px;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
&--inline {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: top;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}Form-label {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
padding-top: var(--Form-label-paddingTop);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
margin-bottom: 0;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
margin-right: calc(var(--Form-item-gap) / 2);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-11-26 19:04:47 +08:00
|
|
|
|
.#{$ns}Form-star {
|
2021-10-15 12:50:55 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
left: px2rem(-6px);
|
|
|
|
|
top: px2rem(3px);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}Form-value {
|
2020-11-04 17:31:46 +08:00
|
|
|
|
display: inline-block;
|
2020-11-04 19:38:10 +08:00
|
|
|
|
vertical-align: top;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2021-04-27 18:29:16 +08:00
|
|
|
|
> .#{$ns}Button--link {
|
|
|
|
|
padding-top: var(--Form-label-paddingTop);
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}Form-control {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
vertical-align: top;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}Form-control.#{$ns}InputGroup {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: inline-flex;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}TextControl--withAddOn {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: inline-flex;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
margin-left: calc(var(--Form-row-gutterWidth) / -2);
|
|
|
|
|
margin-right: calc(var(--Form-row-gutterWidth) / -2);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> * {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
padding-left: calc(var(--Form-row-gutterWidth) / 2);
|
|
|
|
|
padding-right: calc(var(--Form-row-gutterWidth) / 2);
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-col {
|
|
|
|
|
flex-basis: 0;
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
flex-shrink: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-rowInner {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}Form-label {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: top;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
padding-top: var(--Form-label-paddingTop);
|
|
|
|
|
padding-right: var(--Form-row-gutterWidth);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-11-26 19:04:47 +08:00
|
|
|
|
|
2019-12-06 15:22:17 +08:00
|
|
|
|
> .#{$ns}Form-control {
|
2019-11-26 19:04:47 +08:00
|
|
|
|
flex-basis: 0;
|
|
|
|
|
flex-grow: 1;
|
2020-04-15 17:11:16 +08:00
|
|
|
|
|
2020-10-15 10:31:36 +08:00
|
|
|
|
// &:not(.#{$ns}Form-control--withSize) {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
// width: var(--Form-control-widthBase);
|
2020-10-15 10:31:36 +08:00
|
|
|
|
// }
|
2019-11-26 19:04:47 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-12-06 15:22:17 +08:00
|
|
|
|
}
|
2020-08-18 10:50:06 +08:00
|
|
|
|
|
|
|
|
|
.#{$ns}Form--quickEdit {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
min-width: var(--Form-control-widthSm);
|
2020-08-18 10:50:06 +08:00
|
|
|
|
}
|
2021-11-17 20:03:57 +08:00
|
|
|
|
|
|
|
|
|
.#{$ns}Form--column {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
margin-left: calc(var(--Form-group-gutterWidth) / -2);
|
|
|
|
|
margin-right: calc(var(--Form-group-gutterWidth) / -2);
|
|
|
|
|
> .#{$ns}Form-item {
|
2022-01-20 18:32:53 +08:00
|
|
|
|
flex-shrink: 0;
|
2021-11-17 20:03:57 +08:00
|
|
|
|
flex-grow: 1;
|
|
|
|
|
padding-left: calc(var(--Form-group-gutterWidth) / 2);
|
|
|
|
|
padding-right: calc(var(--Form-group-gutterWidth) / 2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form--column-2 > .#{$ns}Form-item {
|
|
|
|
|
width: 50%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form--column-3 > .#{$ns}Form-item {
|
|
|
|
|
width: 33%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form--column-4 > .#{$ns}Form-item {
|
|
|
|
|
width: 25%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form--column-5 > .#{$ns}Form-item {
|
|
|
|
|
width: 20%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form--column-6 > .#{$ns}Form-item {
|
|
|
|
|
width: 16.6%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form--column-7 > .#{$ns}Form-item {
|
|
|
|
|
width: 14.2%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form--column-8 > .#{$ns}Form-item {
|
|
|
|
|
width: 12.5%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-column-9 > .#{$ns}Form-item {
|
|
|
|
|
width: 11.1%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-column-10 > .#{$ns}Form-item {
|
|
|
|
|
width: 10%;
|
|
|
|
|
}
|
2021-12-27 12:47:20 +08:00
|
|
|
|
|
|
|
|
|
/* 移动端样式调整 */
|
|
|
|
|
@include media-breakpoint-down(sm) {
|
|
|
|
|
.#{$ns}Form {
|
|
|
|
|
.#{$ns}Form-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
padding: var(--Form-item-gap) 0;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
|
position: absolute;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
content: ' ';
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
border-bottom: var(--Form-input-borderWidth) solid var(--borderColor);
|
|
|
|
|
transform: scaleY(0.5);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}InputGroup-addOn,
|
|
|
|
|
.#{$ns}TextControl-addOn {
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Form-label {
|
2021-12-29 20:52:28 +08:00
|
|
|
|
flex: 0 0 28%;
|
|
|
|
|
max-width: 28%;
|
2021-12-27 12:47:20 +08:00
|
|
|
|
min-height: 1px;
|
|
|
|
|
text-align: left;
|
|
|
|
|
padding-right: calc(var(--Form--horizontal-gutterWidth) / 2);
|
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
margin-bottom: 0;
|
2021-12-29 20:52:28 +08:00
|
|
|
|
font-size: var(--fontSizeLg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-description {
|
|
|
|
|
font-size: var(--fontSizeBase);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}TextControl-input {
|
|
|
|
|
font-size: var(--fontSizeLg);
|
|
|
|
|
|
|
|
|
|
input {
|
|
|
|
|
height: calc(var(--Form-input-lineHeight) * var(--fontSizeLg));
|
|
|
|
|
}
|
2021-12-27 12:47:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-value,
|
|
|
|
|
.#{$ns}Form-control {
|
|
|
|
|
flex: 1;
|
|
|
|
|
flex-wrap: wrap;
|
2021-12-29 20:52:28 +08:00
|
|
|
|
font-size: var(--fontSizeLg);
|
2021-12-27 12:47:20 +08:00
|
|
|
|
|
|
|
|
|
&.is-disabled > .#{$ns}TextControl-input {
|
|
|
|
|
background: transparent;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-hint,
|
|
|
|
|
.#{$ns}Form-remark,
|
|
|
|
|
.#{$ns}Form-static,
|
|
|
|
|
.#{$ns}Form-group--hor .#{$ns}Form-item,
|
|
|
|
|
.#{$ns}SwitchControl,
|
|
|
|
|
.#{$ns}CheckboxControl,
|
|
|
|
|
.#{$ns}RadiosControl,
|
|
|
|
|
.#{$ns}CheckboxesControl {
|
|
|
|
|
padding-top: 0;
|
|
|
|
|
padding-bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-29 20:52:28 +08:00
|
|
|
|
.#{$ns}Form-group--horizontal .#{$ns}TextControl-input input {
|
|
|
|
|
height: var(--Form-input-height);
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-27 12:47:20 +08:00
|
|
|
|
.#{$ns}Form-hint {
|
2021-12-29 20:52:28 +08:00
|
|
|
|
font-size: var(--fontSizeBase);
|
2021-12-27 12:47:20 +08:00
|
|
|
|
margin-left: 0;
|
|
|
|
|
color: var(--text--muted-color);
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-29 20:52:28 +08:00
|
|
|
|
.#{$ns}TextControl-placeholder {
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-27 12:47:20 +08:00
|
|
|
|
.#{$ns}Form-static {
|
|
|
|
|
min-height: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-29 20:52:28 +08:00
|
|
|
|
.#{$ns}Form-description,
|
|
|
|
|
.#{$ns}Form-feedback {
|
|
|
|
|
font-size: var(--fontSizeBase);
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-27 12:47:20 +08:00
|
|
|
|
.#{$ns}InputGroup {
|
|
|
|
|
.#{$ns}Select,
|
|
|
|
|
.#{$ns}InputGroup-btn .#{$ns}Button {
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
2021-12-29 20:52:28 +08:00
|
|
|
|
|
|
|
|
|
> .#{$ns}TextControl-input input {
|
|
|
|
|
height: var(--Form-input-height);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}ColorPicker {
|
|
|
|
|
padding: 0;
|
|
|
|
|
border: none;
|
|
|
|
|
|
|
|
|
|
.#{$ns}ColorPicker-arrow {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2021-12-27 12:47:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-group--hor .#{$ns}Form-item .#{$ns}Button {
|
|
|
|
|
margin-bottom: var(--gap-xs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}TextareaControl > textarea,
|
|
|
|
|
.#{$ns}Form-control > .#{$ns}TextControl-input,
|
|
|
|
|
.#{$ns}TextControl.is-focused > .#{$ns}TextControl-input {
|
|
|
|
|
border: none;
|
|
|
|
|
padding: 0 var(--Form-input-paddingX) 0 0;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
|
&:focus,
|
|
|
|
|
&.active {
|
|
|
|
|
border: none;
|
|
|
|
|
outline: none;
|
|
|
|
|
outline-style: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-12-29 20:52:28 +08:00
|
|
|
|
|
|
|
|
|
.#{$ns}Form-control > .#{$ns}TextControl-input--multiple {
|
|
|
|
|
padding: 0;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
}
|
2021-12-27 12:47:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-groupColumn {
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Divider {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Tabs-pane {
|
|
|
|
|
padding: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
> .#{$ns}Form-item {
|
|
|
|
|
&:last-child::after,
|
|
|
|
|
&:last-of-type::after {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-item .#{$ns}Form-groupColumn > .#{$ns}Form-item {
|
|
|
|
|
padding-bottom: var(--Form-input-paddingX);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|