@jecloud/ui
Version:
JECloud UI库,基于ant-design-vue封装
430 lines (423 loc) • 8.06 kB
text/less
@import '../../assets/styles/variable.less';
.je-modal--wrapper {
display: none;
position: fixed;
top: 0;
left: 0;
line-height: 1.5;
width: calc(100% + 18px);
height: calc(100% + 18px);
color: @vxe-font-color;
font-family: @vxe-font-family;
transition: top .2s ease-in-out;
&.is--draggable{
.je-modal--box {
opacity: .4 ;
.je-modal--body,
.je-modal--footer{
opacity: 0;
}
}
}
&.is--active {
display: block;
}
&.is--visible {
&.is--mask {
&:before {
background-color: rgba(0, 0, 0, 0.45);
}
}
&.type--message {
.je-modal--box {
opacity: 1;
transform: translateY(0);
}
}
.je-modal--box {
opacity: 1;
visibility: visible;
}
}
&.is--loading {
.je-modal--header,
.je-modal--footer {
position: relative;
border-bottom-color: @vxe-loading-background-color;
&:before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
user-select: none;
background-color: @vxe-loading-background-color;
}
}
}
&:not(.lock--view) {
pointer-events: none;
}
&:not(.type--message) {
&.lock--scroll {
overflow: hidden;
}
&:not(.lock--scroll) {
overflow: auto;
}
}
&.lock--view,
&.is--mask {
&:before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
pointer-events: auto;
}
}
&.is--mask {
&:before {
background-color: rgba(0, 0, 0, 0);
}
}
&.type--message,
&.type--dialog{
.je-modal--body {
white-space: normal;
word-break: break-word;
}
}
&.type--message {
text-align: center;
.je-modal--box {
display: inline-block;
padding: 2px 0;
margin-top: 0;
width: auto;
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
opacity: 0;
transform: translateY(-100%);
.je-modal--body {
&:after {
content: '';
display: block;
clear: both;
height: 0;
overflow: hidden;
visibility: hidden;
}
}
.je-modal--content {
max-width: 800px;
float: left;
}
}
.je-modal--status-wrapper {
font-size: 1.4em;
padding-left: 10px;
}
}
&.type--modal,
&.type--dialog{
.je-modal--header{
font-size: 18px;
}
.je-modal--box {
display: flex;
flex-direction: column;
position: fixed;
left: 50%;
top: 0;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
}
.je-modal--body {
overflow: auto;
.je-modal--content {
overflow: auto;
}
}
.je-modal--status-wrapper {
font-size: 22px;
margin-right: 10px;
}
}
.je-modal--box {
visibility: hidden;
width: 420px;
background-color: @vxe-modal-body-background-color;
border-radius: @vxe-border-radius;
border: 1px solid @vxe-modal-border-color;
text-align: left;
pointer-events: auto;
opacity: 0;
&.is--drag {
cursor: move;
.je-modal--body,
.je-modal--footer {
&:after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
.je-modal--body {
overflow: hidden;
.je-modal--content {
overflow: hidden;
}
}
}
}
&.status--info {
.je-modal--status-wrapper {
color: @vxe-info-color;
}
}
&.status--warning,
&.status--question {
.je-modal--status-wrapper {
color: @vxe-warning-color;
}
}
&.status--success {
.je-modal--status-wrapper {
color: @vxe-success-color;
}
}
&.status--error {
.je-modal--status-wrapper {
color: @vxe-danger-color;
}
}
&.status--loading {
.je-modal--status-wrapper {
color: @vxe-disabled-color;
}
}
.je-modal--status-wrapper {
flex-shrink: 0;
display: flex;
align-items: center;
}
.je-modal--content {
flex-grow: 1;
white-space: pre-line;
}
.je-modal--header,
.je-modal--body,
.je-modal--footer {
position: relative;
}
.je-modal--body {
display: flex;
flex-grow: 1;
padding:0 30px;
}
.je-modal--header {
flex-shrink: 0;
font-size: 20px;
height:70px;
color:#3f3f3f;
display: flex;
align-items: center;
border-radius: @vxe-border-radius @vxe-border-radius 0 0;
user-select: none;
&.is--drag {
cursor: move;
}
&.is--ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.je-modal--title{
flex: auto;
}
.je-modal--title-tools{
flex: none;
@tools-height:24px;
.tool--btn{
width: @tools-height;
height: @tools-height;
line-height: @tools-height;
font-size: 14px;
margin-left: 5px;
text-align: center;
cursor: pointer;
&:hover {
color: @vxe-primary-color;
}
}
}
}
.je-modal--footer-buttons {
flex-shrink: 0;
text-align: right;
height:60px;
display: flex;
align-items: center;
justify-content: flex-end;
button{
margin:0 5px;
&:first-child{
margin-left:0;
}
&:last-child{
margin-right:0;
}
}
}
.je-modal--header,
.je-modal--footer-buttons{
padding:0 20px;
}
&.is--maximize {
.je-modal--box {
.je-modal--header {
cursor: default;
}
}
.je-modal--resize {
.wl-resize,
.wr-resize,
.swst-resize,
.sest-resize,
.st-resize,
.swlb-resize,
.selb-resize,
.sb-resize {
display: none;
}
}
}
.je-modal--resize {
@SpaceSize: 4px;
@SpaceWidth: 4px;
.wl-resize,
.wr-resize,
.swst-resize,
.sest-resize,
.st-resize,
.swlb-resize,
.selb-resize,
.sb-resize {
position: absolute;
z-index: 100;
}
.wl-resize,
.wr-resize {
width: @SpaceSize;
height: 100%;
top: 0;
cursor: w-resize;
}
.wl-resize {
left: -@SpaceWidth;
}
.wr-resize {
right: -@SpaceWidth;
}
.swst-resize,
.sest-resize,
.swlb-resize,
.selb-resize {
width: @SpaceSize + 2;
height: @SpaceSize + 2;
z-index: 101;
}
.swst-resize,
.sest-resize {
top: -@SpaceSize;
}
.swlb-resize,
.selb-resize {
bottom: -@SpaceSize;
}
.sest-resize,
.swlb-resize {
cursor: sw-resize;
}
.swst-resize,
.selb-resize {
cursor: se-resize;
}
.swst-resize,
.swlb-resize {
left: -@SpaceSize;
}
.sest-resize,
.selb-resize {
right: -@SpaceSize;
}
.st-resize,
.sb-resize {
width: 100%;
height: @SpaceSize;
left: 0;
cursor: s-resize;
}
.st-resize {
top: -@SpaceWidth;
}
.sb-resize {
bottom: -@SpaceWidth;
}
}
}
.je-modal--wrapper {
font-size: @vxe-font-size;
}
.ant-message{
.ant-message-custom-content>i{
font-size: 16px;
margin-right: 5px;
&.info{
color:@vxe-info-color;
}
&.warning,
&.question {
color: @vxe-warning-color;
}
&.success {
color: @vxe-success-color;
}
&.error {
color: @vxe-danger-color;
}
&.loading {
color: @vxe-disabled-color;
}
}
}
.ant-notification{
.ant-notification-notice-content{
word-break: break-all;
}
.ant-notification-notice-icon >i {
&.info{
color:@vxe-info-color;
}
&.warning,
&.question {
color: @vxe-warning-color;
}
&.success {
color: @vxe-success-color;
}
&.error {
color: @vxe-danger-color;
}
&.loading {
color: @vxe-disabled-color;
}
}
}