mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:48:55 +08:00
a4803196ff
* fix: 移动端网络请求修复 * fix: popup滑动穿透修复 * feat: 级联选择器移动端优化 * Update NestedSelect.tsx * fix: 修复select自定义内容导致复选框错位问题 * fix: PopUp增加底部安全区 * feat: select选择器移动端优化 * Update Cascader.tsx * Update NestedSelect.tsx * fix: Select选择器输入框样式优化 * fix: line-height 位置调整 * feat: ResultBox 移动端样式优化 * fix: prettier 格式化 * Update _popup.scss * Update PopUp.tsx * Update _popup.scss * Update TransferDropDown.tsx fix: 移动端样式调整 * Update PopUp.tsx * Update Cascader.tsx * Update NestedSelect.tsx 增加移动端通过接口获取数据 * Update NestedSelect.tsx Co-authored-by: zhangxulong <zhangxulong@baidu.com>
161 lines
3.4 KiB
SCSS
161 lines
3.4 KiB
SCSS
.#{$ns}ResultBox {
|
|
@include input-input();
|
|
@include input-border();
|
|
flex-wrap: wrap;
|
|
padding: 0 px2rem(3px);
|
|
min-height: var(--Form-input-height);
|
|
align-items: center;
|
|
|
|
&.is-error {
|
|
border-color: var(--Form-input-onError-borderColor);
|
|
background: var(--Form-input-onError-bg);
|
|
}
|
|
|
|
&.is-focused,
|
|
&.is-active,
|
|
&:focus {
|
|
outline: none;
|
|
border-color: var(--Form-input-onFocused-borderColor);
|
|
box-shadow: var(--Form-input-boxShadow);
|
|
background: var(--Form-input-onFocused-bg);
|
|
}
|
|
|
|
&.is-clickable:not(.is-disabled) {
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
|
border-color: var(--Form-input-onFocused-borderColor);
|
|
box-shadow: var(--Form-input-boxShadow);
|
|
background: var(--Form-input-onFocused-bg);
|
|
}
|
|
}
|
|
|
|
&.is-error.is-focused {
|
|
border-color: var(--Form-input-onError-borderColor);
|
|
}
|
|
|
|
&.is-disabled {
|
|
color: var(--text--muted-color);
|
|
background: var(--Form-input-onDisabled-bg);
|
|
border-color: var(--Form-input-onDisabled-borderColor);
|
|
pointer-events: none;
|
|
}
|
|
|
|
&-singleValue {
|
|
padding: 0 calc(var(--Form-input-paddingX) - #{px2rem(3px)});
|
|
display: inline-block;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
&-clear {
|
|
@include input-clear();
|
|
width: px2rem(26px);
|
|
height: px2rem(26px);
|
|
margin: 0 px2rem(-2px);
|
|
margin-left: auto;
|
|
|
|
&:hover {
|
|
background: var(--ResultBox-value-bg);
|
|
}
|
|
|
|
> svg {
|
|
width: px2rem(12px);
|
|
height: px2rem(12px);
|
|
}
|
|
}
|
|
|
|
> svg {
|
|
display: inline-block;
|
|
width: px2rem(14px);
|
|
color: var(--icon-color);
|
|
}
|
|
|
|
> a {
|
|
cursor: pointer;
|
|
}
|
|
|
|
&-value {
|
|
background: var(--ResultBox-value-bg);
|
|
color: var(--ResultBox-value-color);
|
|
font-size: var(--Form-input-fontSize);
|
|
padding: 0 var(--gap-xs);
|
|
min-height: px2rem(24px);
|
|
flex-wrap: nowrap;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
margin: 2px 3px;
|
|
user-select: none;
|
|
|
|
> a {
|
|
cursor: pointer;
|
|
margin-left: var(--gap-xs);
|
|
color: var(--ResultBox-icon-color);
|
|
&:hover {
|
|
color: var(--ResultBox-icon--onHover-color);
|
|
}
|
|
|
|
> svg {
|
|
width: px2rem(10px);
|
|
height: px2rem(10px);
|
|
}
|
|
}
|
|
|
|
&:hover {
|
|
background: var(--ResultBox-value--onHover-bg);
|
|
}
|
|
|
|
&.is-disabled {
|
|
pointer-events: none;
|
|
color: var(--ResultBox-value--onDisabled-color);
|
|
|
|
> a {
|
|
color: var(--ResultBox-icon--onDisabled-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
&-placeholder {
|
|
color: var(--Form-input-placeholderColor);
|
|
user-select: none;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
> input {
|
|
padding-left: 8px;
|
|
min-height: 24px;
|
|
}
|
|
|
|
&.is-mobile {
|
|
min-height: calc(var(--Form-input-lineHeight) * var(--fontSizeLg));
|
|
border: none;
|
|
padding: 0;
|
|
font-size: var(--fontSizeLg);
|
|
border: none;
|
|
justify-content: flex-end;
|
|
|
|
.#{$ns}ResultBox-arrow {
|
|
margin-right: var(--gap-xs);
|
|
// margin-left: var(--gap-xs);
|
|
width: var(--gap-md);
|
|
text-align: center;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
line-height: 1;
|
|
margin-left: 4px;
|
|
|
|
> svg {
|
|
transition: transform var(--animation-duration);
|
|
display: inline-block;
|
|
color: var(--Form-select-caret-iconColor);
|
|
width: 10px;
|
|
height: 10px;
|
|
top: 0;
|
|
transform: rotate(-90deg);
|
|
}
|
|
}
|
|
}
|
|
}
|