amis/scss/components/_crud.scss

148 lines
2.9 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}Crud {
2019-12-06 09:58:08 +08:00
position: relative;
&.is-loading > &-body {
// 弹框中blur 效果变成白班,先去掉。
// -webkit-filter: blur(5px);
// filter: blur(5px);
2019-12-06 09:58:08 +08:00
}
&-selection {
margin-bottom: var(--gap-base);
2019-12-06 09:58:08 +08:00
}
&-selectionLabel {
display: inline-block;
vertical-align: top;
margin-top: var(--gap-xs);
2019-12-06 09:58:08 +08:00
}
&-value {
cursor: pointer;
vertical-align: middle;
user-select: none;
line-height: calc(
var(--Form-input-lineHeight) * var(--Form-input-fontSize) - #{px2rem(2px)}
);
2019-12-06 09:58:08 +08:00
display: inline-block;
font-size: var(--Form-selectValue-fontSize);
color: var(--Form-selectValue-color);
background: var(--Form-selectValue-bg);
border: px2rem(1px) solid var(--Form-selectValue-borderColor);
2019-12-06 09:58:08 +08:00
border-radius: 2px;
margin-right: var(--gap-xs);
margin-top: var(--gap-xs);
2019-12-06 09:58:08 +08:00
&:hover {
background: var(--Form-selectValue-onHover-bg);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&.is-disabled {
pointer-events: none;
opacity: var(--Button-onDisabled-opacity);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-valueIcon {
cursor: pointer;
border-right: px2rem(1px) solid var(--Form-selectValue-borderColor);
2019-12-06 09:58:08 +08:00
padding: 1px 5px;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&:hover {
background: var(--Form-selectValue-onHover-bg);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
&-valueLabel {
padding: 0 var(--gap-xs);
2019-12-06 09:58:08 +08:00
}
&-selectionClear {
display: inline-block;
cursor: pointer;
user-select: none;
margin-left: var(--gap-xs);
margin-top: var(--gap-xs);
2019-12-06 09:58:08 +08:00
vertical-align: middle;
}
&-toolbar-item {
margin-left: var(--Crud-toolbar-gap);
margin-top: var(--Crud-toolbar-gap);
line-height: var(--Crud-toolbar-lineHeight);
height: var(--Crud-toolbar-height);
2019-12-06 09:58:08 +08:00
vertical-align: middle;
2020-04-29 19:50:15 +08:00
display: inline-flex;
align-items: center;
2019-12-06 09:58:08 +08:00
&--left {
float: left;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
&--right {
float: right;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-actions {
> * + .#{$ns}Button,
> * + .#{$ns}ButtonGroup,
> * + .#{$ns}ButtonToolbar {
margin-left: var(--Crud-toolbar-gap);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-statistics {
line-height: var(--Crud-toolbar-height);
2019-12-06 09:58:08 +08:00
vertical-align: middle;
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-pageSwitch {
.#{$ns}Select {
margin-left: var(--Crud-toolbar-gap);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2020-04-29 19:55:56 +08:00
&-pager {
align-self: flex-start;
}
&-filter {
margin-bottom: var(--gap-base);
}
2019-04-30 11:11:25 +08:00
}
@include media-breakpoint-up(sm) {
2019-12-06 09:58:08 +08:00
.#{$ns}Crud {
&-toolbar {
margin-left: calc(var(--Crud-toolbar-gap) * -1);
margin-top: calc(var(--Crud-toolbar-gap) * -1);
2019-12-06 09:58:08 +08:00
flex-basis: 0;
flex-grow: 1;
@include clearfix();
2019-04-30 11:11:25 +08:00
}
2020-10-26 17:31:13 +08:00
&-toolbar-item {
margin-left: var(--Crud-toolbar-gap);
line-height: var(--Crud-toolbar-lineHeight);
height: var(--Crud-toolbar-height);
2020-10-26 17:31:13 +08:00
vertical-align: middle;
2019-04-30 11:11:25 +08:00
2020-10-26 17:31:13 +08:00
&--left {
float: left;
}
2019-04-30 11:11:25 +08:00
2020-10-26 17:31:13 +08:00
&--right {
float: right;
}
2019-04-30 11:11:25 +08:00
}
2020-10-26 17:31:13 +08:00
&-actions {
> * + .#{$ns}Button,
> * + .#{$ns}Button--disabled-wrap {
margin-left: var(--Crud-toolbar-gap);
2020-10-26 17:31:13 +08:00
}
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
}