// 公共的mixin混入(可以把重复的样式封装为mixin 混入到复用的地方) // .iconBg(@width: 3rem, @height: 3rem, @bgUrl: 'icons.png') { // /*图片背景,大小作为参数传递,默认是30*30*/ // display: inline-block; // width: @width; // height: @height; // cursor: pointer; // background-image: url('../images/@{bgUrl}'); // background-color: transparent; // } .position(@position: static, @top: auto, @right: auto, @bottom: auto, @left: auto) { // 定位方式 position: @position; top: @top; right: @right; bottom: @bottom; left: @left; } .boxShadow(@color, @xWdh, @yWdh, @wdh) { box-shadow: @color @xWdh @yWdh @wdh; -webkit-box-shadow: @color @xWdh @yWdh @wdh; -moz-box-shadow: @color @xWdh @yWdh @wdh; } .link-colors(@normal: @black-color, @hover-color: @hover-color, @visited: @black-color) { /*a标签经过以及访问颜色变化混合器*/ color: @normal; &:hover { color: @hover-color; } &:visited { color: @visited; } } .rounded-corners(@border-radius: 5px, @border-radius1: @border-radius, @border-radius2: @border-radius, @border-radius3: @border-radius) { /*圆角兼容性*/ -moz-border-radius: @border-radius @border-radius1 @border-radius2 @border-radius3; -webkit-border-radius: @border-radius @border-radius1 @border-radius2 @border-radius3; border-radius: @border-radius @border-radius1 @border-radius2 @border-radius3; } // 线性渐变 .linearGradient(@point, @start, @stop) { background-color: @stop; background: linear-gradient(@point, @start, @stop); background: -moz-linear-gradient(@point, @start, @stop); background: -webkit-linear-gradient(@point, @start, @stop); } .transition-animation(@property: all, @duration: 0.2s, @timing-function: linear) { /*过渡动画*/ transition: @property @duration @timing-function; -webkit-transition: @property @duration @timing-function; -moz-transition: @property @duration @timing-function; } .borderStyle(@width: 1px, @style: solid, @color: #181d1f) { border: @width @style @color; } .resetElement(@border: 0, @background: transparent, @radius: 0) { border: @border; background-color: @background; border-radius: @radius; } /* 定制宽高按钮 */ .btn(@width: @width, @height: @height) { width: @width; height: @height; line-height: @height; cursor: pointer; } // flex弹性布局兼容性 .flex { display: -webkit-box; /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */ display: -moz-box; /* Firefox 17- */ display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */ display: -moz-flex; /* Firefox 18+ */ display: -ms-flexbox; /* IE 10 */ display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */ } // 行内flex 弹性布局兼容性 .inlineflex { display: -webkit-inline-box; /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */ display: -moz-inline-box; /* Firefox 17- */ display: -webkit-inline-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */ display: -moz-inline-flex; /* Firefox 18+ */ display: -ms-inline-flexbox; /* IE 10 */ display: inline-flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */ } // 行内元素span强转块元素 .specailSpan(@width: 50%, @height: 2.6rem) { display: inline-block; text-align: center; float: left; width: @width; height: @height; line-height: @height; cursor: pointer; } .inputStyle(@height: 2.8rem, @fontSize: 1.3rem) { height: @height; line-height: @height; border-color: @money-border-color; color: @black-color; font-size: @fontSize; @if @skin == 'black' { background-color: transparent; } @else if @skin == 'white' { background-color: @white-color; } } .ellipse { // 一行显示,超过显示省略号 white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } .dateInputStyle(@width: 12rem, @height: 2.2rem, @fontSize: 1.3rem) { width: @width; height: @height; line-height: @height; @if @skin == 'black' { background-color: transparent; } @else if @skin == 'white' { background-color: @white-color; } border-color: @money-border-color; font-size: @fontSize; } .submitBtnStyle(@width: 12rem, @height: 2.8rem, @fontSize: 1.4rem, @rounded: 2px) { width: @width; height: @height; line-height: @height; padding: 0; color: @white-color; background-color: @hover-color; border-color: @hover-color; font-size: @fontSize; .rounded-corners(@rounded); } .resetBtnStyle(@width: 7rem, @height: 2.2rem, @fontSize: 1.3rem, @rounded: 2px) { width: @width; height: @height; line-height: @height; padding: 0; color: @hover-color; background-color: transparent; border-color: @hover-color; font-size: @fontSize; .rounded-corners(@rounded); } .ant-input { &::placeholder { color: @m-grey10; } } .commonInput { background: #15202B; border: 1px solid @m-grey14; border-radius: 3px; color: #E5E5E5; .ant-input { color: #E5E5E5; background: transparent; } .ant-input-suffix { color: #E5E5E5; } &:hover, &:focus { border-color:#0C95FF; } } .tableConditionInput { width: 140px; height: 30px; line-height: 30px; background: @m-grey9; .rounded-corners(3px); border: 0; color: @m-white1; font-size: 14px; } .tableConditionInput+.tableConditionInput { margin-left: 10px; } .ant-select-dropdown { background: #424E59; border: 1px solid #48545F; box-shadow: 0px 10px 10px 0px rgba(18, 22, 24, 0.36); border-radius: 5px; .ant-select-item { color:@m-grey1; } .ant-select-item-option-active,.ant-select-item-option-selected,.ant-select-item-option-hover { background: @m-blue0; color: @m-white1; } } // 上面表格样式 .topTable { .ant-table { width: 100%; table { border: 0; } .ant-table-thead { tr { box-shadow: 0px 1px 0px 0px #2E3539; th { line-height: 34px; background: @m-black8; padding-top: 0; padding-bottom: 0; color: @m-grey17; font-size: 14px; border-color: @m-black9; } } } .ant-table-tbody { tr { } } .ant-table-placeholder { border: 0; background: @m-black2; } } } .ant-empty-normal { color: @m-grey17; } .ant-empty-img-simple-path,.ant-empty-img-simple-ellipse { fill: @m-grey17; } .ant-empty-img-simple-g { stroke: @m-grey17; } .add-custom { .ant-modal-content { background: #0F1A25; border-radius: 5px; .ant-modal-close { .ant-modal-close-x { width: 40px; height: 40px; line-height: 40px; .ant-modal-close-icon { color: #1271BA; } } } .ant-modal-header { height: 40px; background: linear-gradient(0deg, #112C43, #084258); border-radius: 5px; padding: 0; text-align: center; border-bottom: 0; .ant-modal-title { line-height: 40px; font-size: 16px; color: @m-white0; } } .ant-modal-body { } .ant-modal-footer { border-top: 0; text-align: center; padding-bottom: 31px; .ant-btn-primary { width: 200px; height: 34px; line-height: 34px; border: 0; background: linear-gradient(0deg, @m-blue8 0%, @m-blue9 100%); border-radius: 3px; font-size: 16px; color: @m-white0; &:hover { background: linear-gradient(0deg, @m-blue8-hover 0%, @m-blue9-hover 100%); color: @m-white0-hover; } } } } } .ant-form.inlineForm { .ant-row.ant-form-item { margin-bottom: 21px; .ant-form-item-label { width: 130px; line-height: 30px; text-align: left; label { color: @m-grey1; &::after { content: '' } } } .ant-form-item-control-wrapper { .ant-form-item-control { line-height: 30px; } } } .relative.ant-form-item { position: relative; .tip { position: absolute; font-size: 14px; color: @m-grey1; } } .tc.ant-form-item { .ant-form-item-control-wrapper { margin: 0 auto; } } } .ant-select-single { .ant-select-selector { height: 30px; padding: 0 8px; background: #15202B; border: 1px solid #0C95FF; border-radius: 3px; color: #E5E5E5; } .ant-select-arrow { right: 8px; color: #3A87F7; } } .inlineFormSelect.ant-select-single { .rounded-corners(3px); border: 1px solid #2B3F52; &:hover, &:focus { border-color:#0C95FF; } .ant-select-selector { height: 30px; padding: 0 8px; background: #15202B; border: 0; color: #E5E5E5; .ant-select-selection-placeholder { color: @m-grey10; } } .ant-select-arrow { right: 8px; color: #3A87F7 !important; } } .shortSelect.ant-select-single:extend(.inlineFormSelect.ant-select-single) { margin-right: 0; .ant-select-selector { padding: 0 5px; .ant-select-selection-item { padding-right: 14px; } } } .typeSelect.ant-select-single:extend(.inlineFormSelect.ant-select-single) { .ant-select-selector { .ant-select-selection-placeholder { color: @m-grey10; } } .ant-select-arrow { color: @m-blue0; } } .dialogInput { background: #15202B; border: 1px solid @m-grey14; border-radius: 3px; color: #E5E5E5; .ant-input { color: #E5E5E5; background: transparent } .ant-input-suffix { color: #E5E5E5; } }