@fontColor: #666; @defaultBorderColor: #E6E6E6; @disabledColor: #C2C2C2; @border: 1px solid @defaultBorderColor; @height: 36px; @-webkit-keyframes xm-upbit { from {-webkit-transform: translate3d(0, 30px, 0);opacity: .3} to {-webkit-transform: translate3d(0, 0, 0);opacity: 1} } @keyframes xm-upbit { from {transform: translate3d(0, 30px, 0);opacity: .3} to {transform: translate3d(0, 0, 0);opacity: 1} } @-webkit-keyframes loader { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes loader { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } xm-select{ *{ margin: 0; padding: 0; box-sizing: border-box; font-size: 14px; font-weight: 400; color: @fontColor; text-overflow: ellipsis; user-select: none; } background-color: #FFF; position: relative; border: @border; border-radius: 2px; height: @height; line-height: @height; display: block; width: 100%; cursor: pointer; &:hover{ border-color: #C0C4CC; } & > .xm-tips{ color: #999999; padding: 0 10px; height: 100%; } & > .xm-icon{ display: inline-block; overflow: hidden; position: absolute; width: 0; height: 0; right: 10px; top: 50%; margin-top: -3px; cursor: pointer; border: 6px dashed transparent; border-top-color: #C2C2C2; border-top-style: solid; transition: all .3s; -webkit-transition: all .3s } & > .xm-icon-expand{ margin-top: -9px; transform: rotate(180deg); } & > .xm-label{ // padding: 0 30px 0 10px; position: absolute; top: 0; bottom: 0px; left: 10px; right: 30px; overflow: auto hidden; .scroll{ overflow-y: hidden; .label-content{ height: calc(100% - 20px); display: flex; align-items: baseline; &:after{ content: '-'; opacity: 0; } } } .xm-label-block{ display: flex; position: relative; padding: 0px 5px; margin-right: 5px; height: 26px; line-height: 26px; border-radius: 3px; vertical-align: middle; color: #FFF; & > span{ display: flex; color: #FFF; } & > i{ color: #FFF; margin-left: 8px; font-size: 12px; cursor: pointer; display: flex; } &.disabled{ background-color: @disabledColor !important; cursor: no-drop !important; &>i{ cursor: no-drop !important; } } } } & > .xm-body { position: absolute; left: 0; top: 42px; padding: 5px 0; z-index: 999; width: 100%; border: @border; // max-height: 300px; // overflow-y: auto; background-color: #fff; border-radius: 2px; box-shadow: 0 2px 4px rgba(0, 0, 0, .12); animation-fill-mode: both; animation-name: xm-upbit; animation-duration: .3s; animation-fill-mode: both; &.up{ top: auto; bottom: 42px; } .xm-option{ display: flex; align-items: center; position: relative; padding: 0 10px; cursor: pointer; &:hover{ background-color: #f2f2f2; &>.xm-option-icon{ color: #f2f2f2; } } &-icon{ color: #FFF; display: flex; border: @border; border-radius: 3px; height: 18px; width: 18px; justify-content: center; align-items: center; } &-content{ display: flex; position: relative; padding-left: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #666; width: 100%; } } .xm-select-empty{ text-align: center; color: #999; } .disabled{ cursor: no-drop; &:hover{ background-color: #FFF; &>.xm-option-icon{ color: #FFF !important; } } .xm-option-icon{ border-color: @disabledColor !important; } .xm-option-content{ color: @disabledColor !important; } &.selected>.xm-option-icon{ color: @disabledColor !important; } } .xm-search{ background-color: #FFF !important; position: relative; padding: 0 10px; margin-bottom: 5px; cursor: pointer; &>i{ position: absolute; } &-input{ border: none; border-bottom: 1px solid #E6E6E6; padding-left: 27px; cursor: text; } } .xm-paging{ padding: 0 10px; display: flex; &>span:first-child{ border-radius: 2px 0 0 2px; } &>span:last-child{ border-radius: 0 2px 2px 0 } &>span{ display: flex; flex: auto; justify-content: center; vertical-align: middle; padding: 0 15px; height: 28px; line-height: 28px; margin: 0 -1px 0 0; background-color: #fff; color: #333; font-size: 12px; border: 1px solid #e2e2e2; } } } .xm-input{ cursor: pointer; border-radius: 2px; border-width: 1px; border-style: solid; border-color: #E6E6E6; display: block; width: 100%; box-sizing: border-box; background-color: #FFF; height: 36px; line-height: 1.3; padding-left: 10px; outline: 0; } .dis{ display: none; } .loading{ position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; .loader{ border: .2em dotted currentcolor; border-radius: 50%; -webkit-animation: 1s loader linear infinite; animation: 1s loader linear infinite; display: inline-block; width: 1em; height: 1em; color: inherit; vertical-align: middle; pointer-events: none; } } } // xm-select[ua='win']{ // .xm-option-icon{ // margin-top: 0px; // margin-bottom: -2px; // } // }