@zhangqingcq/plug-r-qw
Version:
A JS lib base on Vue and View-design, you can achieve some complex functions with simple code after install this lib.
455 lines (380 loc) • 7.04 kB
text/less
@import 'color';
@import 'size';
@import 'vueJsonViewerTheme';
/*覆写view-design样式*/
body {
.ivu-input[disabled],
.ivu-select-input[disabled],
fieldset[disabled] .ivu-input,
.ivu-input-number-input[disabled],
.ivu-select-disabled .ivu-select-selection,
.ivu-checkbox-disabled + span {
color: @disabledColor;
-webkit-text-fill-color: @disabledColor;
}
.ivu-input-number-disabled .ivu-input-number-input {
opacity: 1;
}
button.ivu-btn {
padding-top: 0;
padding-bottom: 0;
line-height: 1;
}
.customTabsR {
height: 100% ;
.ivu-tabs-bar {
position: absolute;
top: 0;
left: 0;
width: 100% ;
margin-bottom: 0;
.ivu-tabs-nav-container .ivu-tabs-nav .ivu-tabs-tab {
padding: 11px 16px;
}
}
.ivu-tabs-content {
height: 100% ;
padding-top: @tabsHeadBarH;
> .ivu-tabs-tabpane {
height: 100% ;
&:before {
content: '';
display: table;
}
&:after {
content: '';
display: block;
clear: both;
}
}
}
}
.likeInputX {
display: inline-block;
width: 100%;
border: 1px solid #dcdee2;
box-sizing: border-box;
padding-left: 7px;
height: 32px;
border-radius: 4px;
&.disabled {
background-color: #f3f3f3;
color: @disabledColor;
cursor: not-allowed;
}
}
}
button.disabled {
cursor: not-allowed ;
}
.fl {
float: left;
}
.fr {
float: right;
}
.tl {
text-align: left;
}
.tr {
text-align: right;
}
.tc {
text-align: center;
}
.oh {
overflow: hidden;
}
.hide {
display: none ;
}
.inlineBlock {
display: inline-block;
}
img {
display: block; /*解决图片下边3px空白问题*/
}
.vh100 {
height: 100vh;
}
.btnR {
cursor: pointer;
color: @primary;
user-select: none;
&:hover {
opacity: 0.85;
}
}
.cannotSelect {
user-select: none;
}
.disabledR {
cursor: not-allowed;
opacity: 0.5;
}
.fullHeight {
height: 100% ;
}
.fullFlowContent {
overflow-y: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
&:before {
content: '';
display: table;
}
&:after {
content: '';
display: block;
clear: both;
}
}
.notShrink {
flex-shrink: 0;
}
.notGrow {
flex-grow: 0;
}
.growFlexItem {
flex-grow: 1;
}
.flexColumnBox {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.relativeBox {
position: relative;
}
.noBorder {
border: none ;
}
.withBtn,
.withHeader,
.withPage {
height: calc(100% - @headerH) ;
}
/*$swal弹框*/
.swalBoxX {
will-change: unset ; /*避免弹框在chrome变模糊*/
.swal-footer {
text-align: center;
.swalCancelBt,
.swalConfirmBt {
box-shadow: none;
height: 36px;
display: flex;
justify-content: center;
align-items: center;
padding: 0 25px;
}
.swalConfirmBt {
background-color: @primary;
color: #fff;
&:not([disabled]):hover {
opacity: @hoverOpacity;
}
}
}
}
/*messageBox对话框*/
.customMessageBox {
position: relative;
top: -16px;
left: -20px;
width: calc(100% + 40px);
> .containerN {
overflow: hidden;
position: absolute;
width: 100%;
top: 0;
left: 0;
bottom: -90px;
background-color: #fff;
border-radius: 3px;
z-index: 9;
> .titleN {
height: 40px;
width: 100%;
line-height: 40px;
font-size: 15px;
font-weight: bold;
padding-left: 15px;
border-bottom: 1px solid #f1f4f7;
.closeN {
padding: 4px 4px 3px 3px;
box-shadow: none;
background-color: transparent;
border-color: transparent;
&:hover {
color: #000;
}
i {
line-height: unset;
}
}
}
> .contentN {
padding: 5px 16px;
overflow: auto;
height: calc(100% - 80px);
.msgBoxConO {
margin-top: 6px;
font-size: 14px;
}
}
> .footerN {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 40px;
line-height: 36px;
border-top: 1px solid #f1f4f7;
.okBtN {
box-sizing: border-box;
width: 100px;
background-color: @primary;
color: #fff;
&:hover {
color: @primary;
background-color: #fff;
border-color: @primary;
}
.ivu-load-loop.ivu-icon-ios-loading {
display: none;
margin-right: 6px;
}
&.ivu-btn-loading {
.ivu-load-loop.ivu-icon-ios-loading {
display: inline-block;
}
}
}
.cancelBtN {
box-sizing: border-box;
width: 100px;
margin-left: 10px;
&:hover {
color: @primary;
border-color: @primary;
}
}
}
}
}
/*基于Modal的全屏图片预览组件*/
.previewModal {
position: absolute;
width: 100vw;
height: 100vh;
margin-top: -122px;
margin-left: calc(-50vw + 176px);
display: flex;
justify-content: center;
align-items: center;
.previewModalInner {
position: relative;
> img {
max-width: 95vw;
max-height: 95vh;
}
.previewModalDelete {
position: absolute;
width: @closeTimesW;
height: @closeTimesW;
right: -@closeTimesW;
top: 0;
cursor: pointer;
font-size: @closeTimesW;
color: #fff;
background-color: @closeTimesBg;
&:hover {
color: @warningColor;
background-color: fade(@closeTimesBg, 15%);
}
}
}
}
/*原生DOM全屏图片预览组件*/
.fullScreenImgByDom {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
text-align: center;
z-index: 100000000;
background-color: @modalMaskBg;
display: flex;
justify-content: center;
align-items: center;
.previewInner {
position: relative;
> img {
max-width: 95vw;
max-height: 95vh;
min-width: 200px;
min-height: 150px;
background-color: rgba(255, 255, 255, 0.35);
}
.ivu-icon-md-close,
.pageFBt {
cursor: pointer;
position: absolute;
z-index: 1000;
color: #fff;
font-size: @closeTimesW;
background-color: @closeTimesBg;
display: flex;
align-items: center;
&:hover {
color: @warningColor;
background-color: fade(@closeTimesBg, 15%);
i {
font-weight: bold;
}
}
}
.ivu-icon-md-close {
right: -@closeTimesW;
top: 0;
}
.pageFBt {
top: calc(50% - 30px);
width: @closeTimesW;
height: 60px;
justify-content: center;
&.left {
left: -@closeTimesW;
}
&.right {
right: -@closeTimesW;
}
}
}
.pNotice,
.pName {
color: #fff;
background-color: rgba(0, 0, 0, 0.7);
padding: 4px 15px;
border-radius: 2px;
position: absolute;
opacity: 0.3;
cursor: default;
&:hover {
opacity: 1;
}
}
.pNotice {
font-size: 16px;
bottom: 0;
}
.pName {
top: 0;
}
}