1
0
mirror of synced 2025-12-11 00:28:09 +08:00
Files
vxe-table/styles/toolbar.scss
2023-07-10 00:06:18 +08:00

214 lines
4.7 KiB
SCSS

/**Variable**/
@import './base/checked.scss';
/*toolbar*/
.vxe-toolbar {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
padding: 0.6em 0;
color: var(--vxe-font-color);
font-family: var(--vxe-font-family);
background-color: var(--vxe-toolbar-background-color);
&:after {
content: "";
display: block;
clear: both;
height: 0;
overflow: hidden;
visibility: hidden;
}
&.is--perfect {
border: 1px solid var(--vxe-table-border-color);
border-bottom-width: 0;
background-color: var(--vxe-table-header-background-color);
}
&.is--loading {
&:before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: var(--vxe-loading-z-index);
user-select: none;
background-color: var(--vxe-loading-background-color);
}
}
.vxe-buttons--wrapper {
flex-grow: 1;
& > .vxe-button+.vxe-button--item,
& > .vxe-button--item+.vxe-button,
& > .vxe-button--item+.vxe-button--item {
margin-left: 0.8em;
}
& > .vxe-button--item {
display: inline-block;
}
}
.vxe-tools--wrapper {
& > .vxe-button+.vxe-tool--item,
& > .vxe-tool--item+.vxe-button,
& > .vxe-tool--item+.vxe-tool--item {
margin-left: 0.8em;
}
& > .vxe-tool--item {
display: inline-block;
}
}
.vxe-tools--wrapper {
& > .vxe-button {
display: flex;
align-items: center;
justify-content: center;
}
}
.vxe-buttons--wrapper,
.vxe-tools--wrapper,
.vxe-tools--operate {
display: flex;
align-items: center;
}
.vxe-buttons--wrapper,
.vxe-tools--wrapper {
flex-wrap: wrap;
}
.vxe-tools--operate {
flex-shrink: 0;
}
.vxe-custom--wrapper {
position: relative;
margin-left: 0.8em;
&.is--active {
& > .vxe-button {
background-color: var(--vxe-toolbar-custom-active-background-color);
border-radius: 50%;
}
.vxe-custom--option-wrapper {
display: block;
}
}
}
.vxe-custom--option-wrapper {
display: none;
position: absolute;
right: 2px;
text-align: left;
background-color: var(--vxe-toolbar-panel-background-color);
z-index: 19;
border: 1px solid var(--vxe-table-border-color);
border-radius: var(--vxe-border-radius);
box-shadow: 0 1px 6px rgba(0,0,0,.2);
.vxe-custom--header {
padding: 0.28em 0;
font-weight: 700;
border-bottom: 1px solid var(--vxe-table-popup-border-color);
}
.vxe-custom--body {
padding: 0.2em 0;
max-height: 17.6em;
.vxe-custom--checkbox-option {
&:hover {
background-color: var(--vxe-table-row-hover-background-color);
}
}
}
.vxe-custom--header,
.vxe-custom--body {
& > li {
max-width: 18em;
min-width: 14em;
padding: 0.2em 1em 0.2em 1em;
@for $i from 2 through 8 {
$interval: $i - 1 + 0.2;
&.level--#{$i}{
padding-left: #{$interval + 2.3}em;
.vxe-checkbox--icon {
left: #{$interval + 0.6}em;
}
}
}
}
}
.vxe-custom--footer {
border-top: 1px solid var(--vxe-table-popup-border-color);
text-align: right;
button {
background-color: transparent;
width: 50%;
height: 2.5em;
border: 0;
color: var(--vxe-font-color);
text-align: center;
cursor: pointer;
&:focus {
outline: none;
}
&:hover {
color: var(--vxe-primary-color);
}
}
}
}
}
.vxe-custom--option {
display: flex;
flex-direction: row;
}
.vxe-custom--option-wrapper .vxe-custom--header,
.vxe-custom--option-wrapper .vxe-custom--body {
list-style-type: none;
overflow-x: hidden;
overflow-y: auto;
margin: 0;
padding: 0;
user-select: none;
}
.vxe-custom--checkbox-option {
@extend %XECheckboxIcon;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex-grow: 1;
}
.vxe-custom--fixed-option {
flex-shrink: 0;
padding-left: 0.5em;
display: flex;
flex-direction: row;
align-items: center;
.vxe-custom--fixed-left-option,
.vxe-custom--fixed-right-option {
line-height: 1.34em;
font-size: 1.1em;
padding: 0 0.2em;
cursor: pointer;
&.is--checked,
&:hover {
color: var(--vxe-primary-color);
}
&.is--disabled {
cursor: no-drop;
color: var(--vxe-input-disabled-color);
}
}
}
.vxe-toolbar {
font-size: var(--vxe-font-size);
&.size--medium {
font-size: var(--vxe-font-size-medium);
}
&.size--small {
font-size: var(--vxe-font-size-small);
}
&.size--mini {
font-size: var(--vxe-font-size-mini);
}
}