mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 13:38:56 +08:00
138 lines
3.4 KiB
SCSS
138 lines
3.4 KiB
SCSS
.#{$ns}NestedSelect {
|
|
display: inline-flex;
|
|
vertical-align: middle;
|
|
outline: none;
|
|
position: relative;
|
|
border: $Form-select-borderWidth solid $Form-select-borderColor;
|
|
background: $Form-select-bg;
|
|
border-radius: $Form-select-borderRadius;
|
|
height: $Form-selectOption-height;
|
|
$paddingY: (
|
|
$Form-selectOption-height - $Form-input-lineHeight *
|
|
$Form-input-fontSize - $Form-select-borderWidth * 2
|
|
)/2;
|
|
padding: $paddingY 0 $paddingY $Form-select-paddingX;
|
|
cursor: pointer;
|
|
color: $Form-select-color;
|
|
|
|
&.is-disabled {
|
|
color: $text--muted-color;
|
|
background: $Form-input-onDisabled-bg;
|
|
border-color: $Form-input-onDisabled-borderColor;
|
|
}
|
|
|
|
&.is-focused,
|
|
&.is-opened {
|
|
border-color: $Form-input-onFocused-borderColor;
|
|
// border-bottom: 0;
|
|
|
|
@if ($Form-select-onFocused-color !=$Form-select-color) {
|
|
color: $Form-select-onFocused-color;
|
|
}
|
|
}
|
|
|
|
&.is-opened {
|
|
.#{$ns}Select-arrow:before {
|
|
transform: rotate(180deg);
|
|
}
|
|
}
|
|
|
|
&:not(.is-disabled):hover {
|
|
background: $Form-select-onHover-bg;
|
|
}
|
|
|
|
&-placeholder {
|
|
color: $Form-select-placeholderColor;
|
|
line-height: $Form-input-lineHeight;
|
|
}
|
|
|
|
&-valueWrap {
|
|
user-select: none;
|
|
position: relative;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
&-clear {
|
|
padding: px2rem(3px);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
z-index: 2;
|
|
|
|
svg {
|
|
fill: $Form-input-iconColor;
|
|
width: px2rem(10px);
|
|
height: px2rem(10px);
|
|
}
|
|
|
|
&:hover svg {
|
|
fill: darken($color: $Form-input-iconColor, $amount: 20%);
|
|
}
|
|
}
|
|
|
|
&-optionArrowRight {
|
|
display: inline-block;
|
|
position: absolute;
|
|
right: px2rem(10px);
|
|
|
|
svg {
|
|
width: px2rem(12px);
|
|
height: px2rem(12px);
|
|
fill: $Form-input-iconColor;
|
|
}
|
|
}
|
|
|
|
&-menuOuter,
|
|
&-childrenOuter {
|
|
z-index: 10;
|
|
position: absolute;
|
|
background: $Form-select-menu-bg;
|
|
color: $Form-select-menu-color;
|
|
border: $Form-select-outer-borderWidth solid $Form-input-onFocused-borderColor;
|
|
box-shadow: $Form-select-outer-boxShadow;
|
|
|
|
.#{$ns}NestedSelect-option {
|
|
position: relative;
|
|
padding-left: px2rem(10px);
|
|
height: $Form-input-height;
|
|
line-height: $Form-input-height;
|
|
cursor: pointer;
|
|
|
|
&.is-active {
|
|
color: $Form-select-menu-onActive-color;
|
|
background-color: $Form-select-menu-onActive-bg;
|
|
}
|
|
|
|
&:hover {
|
|
color: $Form-select-menu-onHover-color;
|
|
background-color: $Form-select-menu-onHover-bg;
|
|
}
|
|
|
|
&:hover > .#{$ns}NestedSelect-childrenOuter {
|
|
display: block;
|
|
}
|
|
|
|
.#{$ns}Checkbox {
|
|
display: inline-block;
|
|
padding-top: 0;
|
|
}
|
|
|
|
&.checkall {
|
|
border-bottom: px2rem(1px) solid #eceff8;
|
|
}
|
|
}
|
|
}
|
|
|
|
&-childrenOuter {
|
|
display: none;
|
|
position: relative;
|
|
width: 100%;
|
|
left: 100%;
|
|
transform: translateY(-$Form-input-height);
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
}
|