123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380 |
- /**Variable**/
- @import './helpers/mixin.scss';
- .vxe-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 .4s ease-in-out;
- &.is--active {
- display: block;
- }
- &.is--visible {
- &.is--mask {
- &:before {
- background-color: rgba(0, 0, 0, 0.5);
- }
- }
- &.type--message {
- .vxe-modal--box {
- opacity: 1;
- transform: translateY(0);
- }
- }
- .vxe-modal--box {
- opacity: 1;
- visibility: visible;
- }
- }
- &.is--loading {
- .vxe-modal--header,
- .vxe-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);
- }
- }
- &.is--animat {
- &.is--mask {
- &:before {
- @include animatTransition(background-color, .2s);
- }
- }
- &.type--message {
- .vxe-modal--box {
- &:not(.is--drag) {
- @include animatTransition(all, .4s, ease-out);
- }
- }
- }
- }
- &.type--message,
- &.type--alert,
- &.type--confirm {
- .vxe-modal--body {
- white-space: normal;
- word-break: break-word;
- }
- }
- &.type--message {
- text-align: center;
- .vxe-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%);
- .vxe-modal--body {
- &:after {
- content: '';
- display: block;
- clear: both;
- height: 0;
- overflow: hidden;
- visibility: hidden;
- }
- }
- .vxe-modal--content {
- max-width: 800px;
- float: left;
- }
- }
- .vxe-modal--status-wrapper {
- font-size: 1.4em;
- padding-right: 10px;
- }
- }
- &.type--modal,
- &.type--alert,
- &.type--confirm {
- .vxe-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);
- .vxe-modal--header {
- cursor: move;
- }
- }
- }
- &.type--modal {
- .vxe-modal--header {
- padding: 0.6em 4.6em 0.6em 1em;
- }
- .vxe-modal--body {
- overflow: auto;
- .vxe-modal--content {
- overflow: auto;
- }
- }
- }
- &.type--alert,
- &.type--confirm {
- .vxe-modal--status-wrapper {
- font-size: 1.6em;
- padding: 0 10px 0 2px;
- }
- }
- .vxe-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;
- .vxe-modal--body,
- .vxe-modal--footer {
- &:after {
- content: "";
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- }
- }
- .vxe-modal--body {
- overflow: hidden;
- .vxe-modal--content {
- overflow: hidden;
- }
- }
- }
- }
- &.status--info {
- .vxe-modal--status-wrapper {
- color: $vxe-info-color;
- }
- }
- &.status--warning,
- &.status--question {
- .vxe-modal--status-wrapper {
- color: $vxe-warning-color;
- }
- }
- &.status--success {
- .vxe-modal--status-wrapper {
- color: $vxe-success-color;
- }
- }
- &.status--error {
- .vxe-modal--status-wrapper {
- color: $vxe-danger-color;
- }
- }
- &.status--loading {
- .vxe-modal--status-wrapper {
- color: $vxe-disabled-color;
- }
- }
- .vxe-modal--status-wrapper {
- flex-shrink: 0;
- display: flex;
- align-items: center;
- }
- .vxe-modal--content {
- flex-grow: 1;
- }
- .vxe-modal--header,
- .vxe-modal--body,
- .vxe-modal--footer {
- position: relative;
- }
- .vxe-modal--body {
- display: flex;
- flex-grow: 1;
- padding: 0.6em 1em;
- }
- .vxe-modal--header {
- flex-shrink: 0;
- font-size: 1.1em;
- font-weight: 700;
- padding: 0.6em 2.8em 0.6em 1em;
- border-bottom: 1px solid $vxe-modal-border-color;
- background-color: $vxe-modal-header-background-color;
- border-radius: $vxe-border-radius $vxe-border-radius 0 0;
- user-select: none;
- &.is--ellipsis {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- .vxe-modal--zoom-btn,
- .vxe-modal--close-btn {
- position: absolute;
- right: 14px;
- top: 0.85em;
- z-index: 1;
- cursor: pointer;
- &:hover {
- color: $vxe-primary-color;
- }
- }
- .vxe-modal--zoom-btn {
- right: 44px;
- }
- .vxe-modal--footer {
- flex-shrink: 0;
- text-align: right;
- padding: 0.8em 1em;
- }
- &.is--maximize {
- .vxe-modal--box {
- .vxe-modal--header {
- cursor: default;
- }
- }
- .vxe-modal--resize {
- .wl-resize,
- .wr-resize,
- .swst-resize,
- .sest-resize,
- .st-resize,
- .swlb-resize,
- .selb-resize,
- .sb-resize {
- display: none;
- }
- }
- }
- .vxe-modal--resize {
- $SpaceSize: 8;
- .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}px;
- height: 100%;
- top: 0;
- cursor: w-resize;
- }
- .wl-resize {
- left: -#{$SpaceSize / 2 + 1}px;
- }
- .wr-resize {
- right: -#{$SpaceSize / 2 + 1}px;
- }
- .swst-resize,
- .sest-resize,
- .swlb-resize,
- .selb-resize {
- width: #{$SpaceSize + 2}px;
- height: #{$SpaceSize + 2}px;
- z-index: 101;
- }
- .swst-resize,
- .sest-resize {
- top: -#{$SpaceSize}px;
- }
- .swlb-resize,
- .selb-resize {
- bottom: -#{$SpaceSize}px;
- }
- .sest-resize,
- .swlb-resize {
- cursor: sw-resize;
- }
- .swst-resize,
- .selb-resize {
- cursor: se-resize;
- }
- .swst-resize,
- .swlb-resize {
- left: -#{$SpaceSize}px;
- }
- .sest-resize,
- .selb-resize {
- right: -#{$SpaceSize}px;
- }
- .st-resize,
- .sb-resize {
- width: 100%;
- height: #{$SpaceSize}px;
- left: 0;
- cursor: s-resize;
- }
- .st-resize {
- top: -#{$SpaceSize / 2 + 1}px;
- }
- .sb-resize {
- bottom: -#{$SpaceSize / 2 + 1}px;
- }
- }
- }
- .vxe-modal--wrapper {
- font-size: $vxe-font-size;
- &.size--medium {
- font-size: $vxe-font-size-medium;
- }
- &.size--small {
- font-size: $vxe-font-size-small;
- }
- &.size--mini {
- font-size: $vxe-font-size-mini;
- }
- }
|