1
0
mirror of synced 2025-12-09 15:24:36 +08:00
Files
vxe-table/styles/select.scss
xuliangzhan 78473f38f4 fix css var
2023-06-11 12:42:38 +08:00

212 lines
4.3 KiB
SCSS

/**Variable**/
@import './helpers/mixin.scss';
.vxe-select {
position: relative;
display: inline-block;
width: 180px;
color: var(--vxe-font-color);
text-align: left;
& > .vxe-input {
.vxe-input--inner {
cursor: pointer;
}
}
&.is--disabled {
& > .vxe-input {
.vxe-input--inner {
cursor: no-drop;
}
}
}
&.is--loading {
& > .vxe-input {
.vxe-input--inner {
cursor: progress;
}
}
}
& > .vxe-input {
width: 100%;
.vxe-input--suffix-icon {
display: inline-block;
@include animatTransition(transform, .2s);
}
}
&.is--active {
&:not(.is--filter) {
& > .vxe-input {
.vxe-input--inner {
border: 1px solid var(--vxe-primary-color);
}
}
}
}
}
.vxe-select-slots {
display: none;
}
.vxe-select--panel {
display: none;
position: absolute;
left: 0;
padding: 4px 0;
color: var(--vxe-font-color);
text-align: left;
&:not(.is--transfer) {
min-width: 100%;
}
&.is--transfer {
position: fixed;
}
&.animat--leave {
display: block;
opacity: 0;
transform: scaleY(0.5);
transition: transform .3s cubic-bezier(.23,1,.32,1), opacity .3s cubic-bezier(.23,1,.32,1);
transform-origin: center top;
backface-visibility: hidden;
transform-style: preserve-3d;
&[placement="top"] {
transform-origin: center bottom;
}
}
&.animat--enter {
opacity: 1;
transform: scaleY(1);
}
}
.vxe-select-filter--wrapper {
display: block;
.vxe-select-filter--input {
width: 100%;
}
}
.vxe-select-option--wrapper {
position: relative;
overflow-x: hidden;
overflow-y: auto;
padding: 4px 0;
max-height: 200px;
border-radius: var(--vxe-border-radius);
border: 1px solid var(--vxe-table-popup-border-color);
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
background-color: var(--vxe-select-panel-background-color);
}
.vxe-optgroup {
.vxe-optgroup--title {
padding: 0 6px;
color: var(--vxe-optgroup-title-color);
font-size: 12px;
}
}
.vxe-optgroup--wrapper {
.vxe-select-option {
padding: 0 20px;
}
}
.vxe-select-option {
padding: 0 0.6em;
max-width: 600px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
user-select: none;
&.is--selected {
font-weight: 700;
color: var(--vxe-primary-color);
}
&:not(.is--disabled) {
cursor: pointer;
&.is--hover {
background-color: var(--vxe-select-option-hover-background-color);
}
}
&.is--disabled {
color: var(--vxe-font-disabled-color);
cursor: no-drop;
}
}
.vxe-select--search-icon {
margin-right: 0.5em;
}
.vxe-select--search-loading,
.vxe-select--empty-placeholder {
padding: 0 0.6em;
text-align: center;
color: var(--vxe-select-empty-color);
}
.vxe-select,
.vxe-select--panel {
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);
}
}
.vxe-select--panel {
.vxe-optgroup--title,
.vxe-select-option {
height: var(--vxe-select-option-height-default);
}
.vxe-optgroup--title,
.vxe-select-option,
.vxe-select--search-loading,
.vxe-select--empty-placeholder {
line-height: var(--vxe-select-option-height-default);
}
&.size--medium {
.vxe-optgroup--title,
.vxe-select-option {
height: var(--vxe-select-option-height-medium);
}
.vxe-optgroup--title,
.vxe-select-option,
.vxe-select--search-loading,
.vxe-select--empty-placeholder {
line-height: var(--vxe-select-option-height-medium);
}
}
&.size--small {
.vxe-optgroup--title,
.vxe-select-option {
height: var(--vxe-select-option-height-small);
}
.vxe-optgroup--title,
.vxe-select-option,
.vxe-select--search-loading,
.vxe-select--empty-placeholder {
line-height: var(--vxe-select-option-height-small);
}
}
&.size--mini {
.vxe-optgroup--title,
.vxe-select-option {
height: var(--vxe-select-option-height-mini);
}
.vxe-optgroup--title,
.vxe-select-option,
.vxe-select--search-loading,
.vxe-select--empty-placeholder {
line-height: var(--vxe-select-option-height-mini);
}
}
}