1 |
|
2 | @import './helpers/mixin.scss';
|
3 |
|
4 | .vxe-modal--wrapper {
|
5 | display: none;
|
6 | position: fixed;
|
7 | top: 0;
|
8 | left: 0;
|
9 | line-height: 1.5;
|
10 | width: calc(100% + 18px);
|
11 | height: calc(100% + 18px);
|
12 | color: $vxe-font-color;
|
13 | font-family: $vxe-font-family;
|
14 | transition: top .4s ease-in-out;
|
15 | &.is--active {
|
16 | display: block;
|
17 | }
|
18 | &.is--visible {
|
19 | &.is--mask {
|
20 | &:before {
|
21 | background-color: rgba(0, 0, 0, 0.5);
|
22 | }
|
23 | }
|
24 | &.type--message {
|
25 | .vxe-modal--box {
|
26 | opacity: 1;
|
27 | transform: translateY(0);
|
28 | }
|
29 | }
|
30 | .vxe-modal--box {
|
31 | opacity: 1;
|
32 | visibility: visible;
|
33 | }
|
34 | }
|
35 | &.is--loading {
|
36 | .vxe-modal--header,
|
37 | .vxe-modal--footer {
|
38 | position: relative;
|
39 | border-bottom-color: $vxe-loading-background-color;
|
40 | &:before {
|
41 | content: "";
|
42 | position: absolute;
|
43 | top: 0;
|
44 | left: 0;
|
45 | width: 100%;
|
46 | height: 100%;
|
47 | z-index: 1;
|
48 | user-select: none;
|
49 | background-color: $vxe-loading-background-color;
|
50 | }
|
51 | }
|
52 | }
|
53 | &:not(.lock--view) {
|
54 | pointer-events: none;
|
55 | }
|
56 | &:not(.type--message) {
|
57 | &.lock--scroll {
|
58 | overflow: hidden;
|
59 | }
|
60 | &:not(.lock--scroll) {
|
61 | overflow: auto;
|
62 | }
|
63 | }
|
64 | &.lock--view,
|
65 | &.is--mask {
|
66 | &:before {
|
67 | content: "";
|
68 | position: fixed;
|
69 | top: 0;
|
70 | left: 0;
|
71 | width: 100%;
|
72 | height: 100%;
|
73 | z-index: -1;
|
74 | pointer-events: auto;
|
75 | }
|
76 | }
|
77 | &.is--mask {
|
78 | &:before {
|
79 | background-color: rgba(0, 0, 0, 0);
|
80 | }
|
81 | }
|
82 | &.is--animat {
|
83 | &.is--mask {
|
84 | &:before {
|
85 | @include animatTransition(background-color, .2s);
|
86 | }
|
87 | }
|
88 | &.type--message {
|
89 | .vxe-modal--box {
|
90 | &:not(.is--drag) {
|
91 | @include animatTransition(all, .4s, ease-out);
|
92 | }
|
93 | }
|
94 | }
|
95 | }
|
96 | &.type--message,
|
97 | &.type--alert,
|
98 | &.type--confirm {
|
99 | .vxe-modal--body {
|
100 | white-space: normal;
|
101 | word-break: break-word;
|
102 | }
|
103 | }
|
104 | &.type--message {
|
105 | text-align: center;
|
106 | .vxe-modal--box {
|
107 | display: inline-block;
|
108 | padding: 2px 0;
|
109 | margin-top: 0;
|
110 | width: auto;
|
111 | box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
|
112 | opacity: 0;
|
113 | transform: translateY(-100%);
|
114 | .vxe-modal--body {
|
115 | &:after {
|
116 | content: '';
|
117 | display: block;
|
118 | clear: both;
|
119 | height: 0;
|
120 | overflow: hidden;
|
121 | visibility: hidden;
|
122 | }
|
123 | }
|
124 | .vxe-modal--content {
|
125 | max-width: 800px;
|
126 | float: left;
|
127 | }
|
128 | }
|
129 | .vxe-modal--status-wrapper {
|
130 | font-size: 1.4em;
|
131 | padding-left: 10px;
|
132 | }
|
133 | }
|
134 | &.type--modal,
|
135 | &.type--alert,
|
136 | &.type--confirm {
|
137 | .vxe-modal--box {
|
138 | display: flex;
|
139 | flex-direction: column;
|
140 | position: fixed;
|
141 | left: 50%;
|
142 | top: 0;
|
143 | box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
|
144 | }
|
145 | .vxe-modal--body {
|
146 | overflow: auto;
|
147 | .vxe-modal--content {
|
148 | overflow: auto;
|
149 | }
|
150 | }
|
151 | }
|
152 |
|
153 | &.type--modal {
|
154 | .vxe-modal--header {
|
155 | padding: 0.6em 4.6em 0.6em 1em;
|
156 | }
|
157 | }
|
158 | &.type--alert,
|
159 | &.type--confirm {
|
160 | .vxe-modal--status-wrapper {
|
161 | font-size: 1.6em;
|
162 | padding-left: 10px;
|
163 | }
|
164 | }
|
165 | .vxe-modal--box {
|
166 | visibility: hidden;
|
167 | width: 420px;
|
168 | background-color: $vxe-modal-body-background-color;
|
169 | border-radius: $vxe-border-radius;
|
170 | border: 1px solid $vxe-modal-border-color;
|
171 | text-align: left;
|
172 | pointer-events: auto;
|
173 | opacity: 0;
|
174 | &.is--drag {
|
175 | cursor: move;
|
176 | .vxe-modal--body,
|
177 | .vxe-modal--footer {
|
178 | &:after {
|
179 | content: "";
|
180 | position: absolute;
|
181 | top: 0;
|
182 | left: 0;
|
183 | width: 100%;
|
184 | height: 100%;
|
185 | }
|
186 | }
|
187 | .vxe-modal--body {
|
188 | overflow: hidden;
|
189 | .vxe-modal--content {
|
190 | overflow: hidden;
|
191 | }
|
192 | }
|
193 | }
|
194 | }
|
195 | &.status--info {
|
196 | .vxe-modal--status-wrapper {
|
197 | color: $vxe-info-color;
|
198 | }
|
199 | }
|
200 | &.status--warning,
|
201 | &.status--question {
|
202 | .vxe-modal--status-wrapper {
|
203 | color: $vxe-warning-color;
|
204 | }
|
205 | }
|
206 | &.status--success {
|
207 | .vxe-modal--status-wrapper {
|
208 | color: $vxe-success-color;
|
209 | }
|
210 | }
|
211 | &.status--error {
|
212 | .vxe-modal--status-wrapper {
|
213 | color: $vxe-danger-color;
|
214 | }
|
215 | }
|
216 | &.status--loading {
|
217 | .vxe-modal--status-wrapper {
|
218 | color: $vxe-disabled-color;
|
219 | }
|
220 | }
|
221 | .vxe-modal--status-wrapper {
|
222 | flex-shrink: 0;
|
223 | display: flex;
|
224 | align-items: center;
|
225 | }
|
226 | .vxe-modal--content {
|
227 | flex-grow: 1;
|
228 | padding: 0.8em 1em;
|
229 | white-space: pre-line;
|
230 | }
|
231 | .vxe-modal--header,
|
232 | .vxe-modal--body,
|
233 | .vxe-modal--footer {
|
234 | position: relative;
|
235 | }
|
236 | .vxe-modal--body {
|
237 | display: flex;
|
238 | flex-grow: 1;
|
239 | }
|
240 | .vxe-modal--header {
|
241 | flex-shrink: 0;
|
242 | font-size: 1.1em;
|
243 | font-weight: 700;
|
244 | padding: 0.6em 2.8em 0.6em 1em;
|
245 | border-bottom: 1px solid $vxe-modal-border-color;
|
246 | background-color: $vxe-modal-header-background-color;
|
247 | border-radius: $vxe-border-radius $vxe-border-radius 0 0;
|
248 | user-select: none;
|
249 | &.is--drag {
|
250 | cursor: move;
|
251 | }
|
252 | &.is--ellipsis {
|
253 | overflow: hidden;
|
254 | text-overflow: ellipsis;
|
255 | white-space: nowrap;
|
256 | }
|
257 | }
|
258 | .vxe-modal--zoom-btn,
|
259 | .vxe-modal--close-btn {
|
260 | position: absolute;
|
261 | right: 14px;
|
262 | top: 0.85em;
|
263 | z-index: 1;
|
264 | cursor: pointer;
|
265 | &:hover {
|
266 | color: $vxe-primary-color;
|
267 | }
|
268 | }
|
269 | .vxe-modal--zoom-btn {
|
270 | right: 44px;
|
271 | }
|
272 | .vxe-modal--footer {
|
273 | flex-shrink: 0;
|
274 | text-align: right;
|
275 | padding: 0.4em 1em 0.8em 1em;
|
276 | }
|
277 | &.is--maximize {
|
278 | .vxe-modal--box {
|
279 | .vxe-modal--header {
|
280 | cursor: default;
|
281 | }
|
282 | }
|
283 | .vxe-modal--resize {
|
284 | .wl-resize,
|
285 | .wr-resize,
|
286 | .swst-resize,
|
287 | .sest-resize,
|
288 | .st-resize,
|
289 | .swlb-resize,
|
290 | .selb-resize,
|
291 | .sb-resize {
|
292 | display: none;
|
293 | }
|
294 | }
|
295 | }
|
296 | .vxe-modal--resize {
|
297 | $SpaceSize: 8;
|
298 | .wl-resize,
|
299 | .wr-resize,
|
300 | .swst-resize,
|
301 | .sest-resize,
|
302 | .st-resize,
|
303 | .swlb-resize,
|
304 | .selb-resize,
|
305 | .sb-resize {
|
306 | position: absolute;
|
307 | z-index: 100;
|
308 | }
|
309 | .wl-resize,
|
310 | .wr-resize {
|
311 | width: #{$SpaceSize}px;
|
312 | height: 100%;
|
313 | top: 0;
|
314 | cursor: w-resize;
|
315 | }
|
316 | .wl-resize {
|
317 | left: -#{$SpaceSize * 0.5 + 1}px;
|
318 | }
|
319 | .wr-resize {
|
320 | right: -#{$SpaceSize * 0.5 + 1}px;
|
321 | }
|
322 | .swst-resize,
|
323 | .sest-resize,
|
324 | .swlb-resize,
|
325 | .selb-resize {
|
326 | width: #{$SpaceSize + 2}px;
|
327 | height: #{$SpaceSize + 2}px;
|
328 | z-index: 101;
|
329 | }
|
330 | .swst-resize,
|
331 | .sest-resize {
|
332 | top: -#{$SpaceSize}px;
|
333 | }
|
334 | .swlb-resize,
|
335 | .selb-resize {
|
336 | bottom: -#{$SpaceSize}px;
|
337 | }
|
338 | .sest-resize,
|
339 | .swlb-resize {
|
340 | cursor: sw-resize;
|
341 | }
|
342 | .swst-resize,
|
343 | .selb-resize {
|
344 | cursor: se-resize;
|
345 | }
|
346 | .swst-resize,
|
347 | .swlb-resize {
|
348 | left: -#{$SpaceSize}px;
|
349 | }
|
350 | .sest-resize,
|
351 | .selb-resize {
|
352 | right: -#{$SpaceSize}px;
|
353 | }
|
354 | .st-resize,
|
355 | .sb-resize {
|
356 | width: 100%;
|
357 | height: #{$SpaceSize}px;
|
358 | left: 0;
|
359 | cursor: s-resize;
|
360 | }
|
361 | .st-resize {
|
362 | top: -#{$SpaceSize * 0.5 + 1}px;
|
363 | }
|
364 | .sb-resize {
|
365 | bottom: -#{$SpaceSize * 0.5 + 1}px;
|
366 | }
|
367 | }
|
368 | }
|
369 |
|
370 | .vxe-modal--wrapper {
|
371 | font-size: $vxe-font-size;
|
372 | &.size--medium {
|
373 | font-size: $vxe-font-size-medium;
|
374 | }
|
375 | &.size--small {
|
376 | font-size: $vxe-font-size-small;
|
377 | }
|
378 | &.size--mini {
|
379 | font-size: $vxe-font-size-mini;
|
380 | }
|
381 | } |
\ | No newline at end of file |