@ganwei-web/gw-base-components-plus 1.0.38 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/element-plus-adapter/dist/ElementPlusAdapter.cjs +355 -111
- package/element-plus-adapter/dist/ElementPlusAdapter.cjs.map +1 -1
- package/element-plus-adapter/dist/ElementPlusAdapter.css +32 -1
- package/element-plus-adapter/dist/ElementPlusAdapter.iife.js +355 -111
- package/element-plus-adapter/dist/ElementPlusAdapter.iife.js.map +1 -1
- package/element-plus-adapter/dist/ElementPlusAdapter.js +357 -113
- package/element-plus-adapter/dist/ElementPlusAdapter.js.map +1 -1
- package/formdesigner/vform/designer.style.css +1 -1
- package/formdesigner/vform/designer.umd.js +321 -471
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
2
2
|
"use strict";
|
|
3
|
+
const overlayNoTransition = "";
|
|
3
4
|
function useExpose(proxyElement) {
|
|
4
5
|
const expose = new Proxy({}, {
|
|
5
6
|
get(target, key) {
|
|
@@ -12,7 +13,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
12
13
|
});
|
|
13
14
|
return expose;
|
|
14
15
|
}
|
|
15
|
-
const _sfc_main$
|
|
16
|
+
const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
16
17
|
...{
|
|
17
18
|
inheritAttrs: false
|
|
18
19
|
},
|
|
@@ -60,7 +61,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
60
61
|
}
|
|
61
62
|
});
|
|
62
63
|
const index_vue_vue_type_style_index_0_lang$u = "";
|
|
63
|
-
const _sfc_main$
|
|
64
|
+
const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
64
65
|
__name: "index",
|
|
65
66
|
setup(__props, { expose: __expose }) {
|
|
66
67
|
const attrs = vue.useAttrs();
|
|
@@ -92,7 +93,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
92
93
|
console.warn(`${UI_AUTOMATION_TOKEN} is required to UI Automation`);
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
const _sfc_main$
|
|
96
|
+
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
96
97
|
__name: "ElInput",
|
|
97
98
|
props: {
|
|
98
99
|
"modelValue": {
|
|
@@ -142,7 +143,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
142
143
|
}
|
|
143
144
|
});
|
|
144
145
|
const ElInput_vue_vue_type_style_index_0_lang = "";
|
|
145
|
-
const _sfc_main$
|
|
146
|
+
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
146
147
|
__name: "index",
|
|
147
148
|
setup(__props, { expose: __expose }) {
|
|
148
149
|
const proxyElement = vue.ref();
|
|
@@ -167,7 +168,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
167
168
|
}
|
|
168
169
|
});
|
|
169
170
|
const index_vue_vue_type_style_index_0_lang$s = "";
|
|
170
|
-
const _sfc_main$
|
|
171
|
+
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
171
172
|
__name: "index",
|
|
172
173
|
setup(__props, { expose: __expose }) {
|
|
173
174
|
const attrs = vue.useAttrs();
|
|
@@ -191,7 +192,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
191
192
|
};
|
|
192
193
|
}
|
|
193
194
|
});
|
|
194
|
-
const _sfc_main$
|
|
195
|
+
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
195
196
|
__name: "index",
|
|
196
197
|
setup(__props, { expose: __expose }) {
|
|
197
198
|
const proxyElement = vue.ref();
|
|
@@ -217,7 +218,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
217
218
|
}
|
|
218
219
|
});
|
|
219
220
|
const index_vue_vue_type_style_index_0_lang$r = "";
|
|
220
|
-
const _sfc_main$
|
|
221
|
+
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
221
222
|
__name: "index",
|
|
222
223
|
setup(__props, { expose: __expose }) {
|
|
223
224
|
const attrs = vue.useAttrs();
|
|
@@ -241,7 +242,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
241
242
|
};
|
|
242
243
|
}
|
|
243
244
|
});
|
|
244
|
-
const _sfc_main$
|
|
245
|
+
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
245
246
|
...{
|
|
246
247
|
inheritAttrs: false
|
|
247
248
|
},
|
|
@@ -269,7 +270,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
269
270
|
}
|
|
270
271
|
});
|
|
271
272
|
const index_vue_vue_type_style_index_0_lang$q = "";
|
|
272
|
-
const _sfc_main$
|
|
273
|
+
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
273
274
|
...{
|
|
274
275
|
inheritAttrs: false
|
|
275
276
|
},
|
|
@@ -296,7 +297,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
296
297
|
};
|
|
297
298
|
}
|
|
298
299
|
});
|
|
299
|
-
const _sfc_main$
|
|
300
|
+
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
300
301
|
__name: "index",
|
|
301
302
|
setup(__props, { expose: __expose }) {
|
|
302
303
|
const proxyElement = vue.ref();
|
|
@@ -321,7 +322,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
321
322
|
}
|
|
322
323
|
});
|
|
323
324
|
const index_vue_vue_type_style_index_0_lang$p = "";
|
|
324
|
-
const _sfc_main$
|
|
325
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
325
326
|
__name: "index",
|
|
326
327
|
props: {
|
|
327
328
|
round: {
|
|
@@ -354,7 +355,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
354
355
|
}
|
|
355
356
|
});
|
|
356
357
|
const index_vue_vue_type_style_index_0_lang$o = "";
|
|
357
|
-
const _sfc_main$
|
|
358
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
358
359
|
__name: "index",
|
|
359
360
|
setup(__props, { expose: __expose }) {
|
|
360
361
|
const attrs = vue.useAttrs();
|
|
@@ -378,7 +379,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
378
379
|
};
|
|
379
380
|
}
|
|
380
381
|
});
|
|
381
|
-
const _sfc_main$
|
|
382
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
382
383
|
__name: "index",
|
|
383
384
|
setup(__props, { expose: __expose }) {
|
|
384
385
|
const proxyElement = vue.ref();
|
|
@@ -404,7 +405,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
404
405
|
}
|
|
405
406
|
});
|
|
406
407
|
const index_vue_vue_type_style_index_0_lang$n = "";
|
|
407
|
-
const _sfc_main$
|
|
408
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
408
409
|
__name: "index",
|
|
409
410
|
setup(__props, { expose: __expose }) {
|
|
410
411
|
const proxyElement = vue.ref();
|
|
@@ -429,7 +430,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
429
430
|
}
|
|
430
431
|
});
|
|
431
432
|
const index_vue_vue_type_style_index_0_lang$m = "";
|
|
432
|
-
const _sfc_main$
|
|
433
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
433
434
|
__name: "index",
|
|
434
435
|
props: {
|
|
435
436
|
defaultTime: {},
|
|
@@ -479,7 +480,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
479
480
|
}
|
|
480
481
|
});
|
|
481
482
|
const index_vue_vue_type_style_index_0_lang$l = "";
|
|
482
|
-
const _sfc_main$
|
|
483
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
483
484
|
__name: "index",
|
|
484
485
|
setup(__props, { expose: __expose }) {
|
|
485
486
|
const proxyElement = vue.ref();
|
|
@@ -504,7 +505,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
504
505
|
}
|
|
505
506
|
});
|
|
506
507
|
const index_vue_vue_type_style_index_0_lang$k = "";
|
|
507
|
-
const _sfc_main$
|
|
508
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
508
509
|
__name: "index",
|
|
509
510
|
setup(__props, { expose: __expose }) {
|
|
510
511
|
const proxyElement = vue.ref();
|
|
@@ -529,7 +530,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
529
530
|
}
|
|
530
531
|
});
|
|
531
532
|
const index_vue_vue_type_style_index_0_lang$j = "";
|
|
532
|
-
const _sfc_main$
|
|
533
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
533
534
|
__name: "index",
|
|
534
535
|
setup(__props, { expose: __expose }) {
|
|
535
536
|
const attrs = vue.useAttrs();
|
|
@@ -554,7 +555,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
554
555
|
}
|
|
555
556
|
});
|
|
556
557
|
const index_vue_vue_type_style_index_0_lang$i = "";
|
|
557
|
-
const _sfc_main$
|
|
558
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
558
559
|
__name: "index",
|
|
559
560
|
setup(__props, { expose: __expose }) {
|
|
560
561
|
const proxyElement = vue.ref();
|
|
@@ -586,7 +587,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
586
587
|
}
|
|
587
588
|
});
|
|
588
589
|
const index_vue_vue_type_style_index_0_lang$h = "";
|
|
589
|
-
const _sfc_main$
|
|
590
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
590
591
|
__name: "index",
|
|
591
592
|
props: {
|
|
592
593
|
formatter: {
|
|
@@ -624,7 +625,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
624
625
|
};
|
|
625
626
|
}
|
|
626
627
|
});
|
|
627
|
-
const _sfc_main$
|
|
628
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
628
629
|
__name: "index",
|
|
629
630
|
setup(__props, { expose: __expose }) {
|
|
630
631
|
const attrs = vue.useAttrs();
|
|
@@ -649,7 +650,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
649
650
|
}
|
|
650
651
|
});
|
|
651
652
|
const index_vue_vue_type_style_index_0_lang$g = "";
|
|
652
|
-
const _sfc_main$
|
|
653
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
653
654
|
__name: "index",
|
|
654
655
|
setup(__props, { expose: __expose }) {
|
|
655
656
|
const attrs = vue.useAttrs();
|
|
@@ -702,7 +703,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
702
703
|
}
|
|
703
704
|
}), picture_default = _sfc_main197;
|
|
704
705
|
const _hoisted_1 = { class: "error-slot" };
|
|
705
|
-
const _sfc_main$
|
|
706
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
706
707
|
...{ inheritAttrs: false },
|
|
707
708
|
__name: "index",
|
|
708
709
|
props: {
|
|
@@ -775,7 +776,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
775
776
|
}
|
|
776
777
|
});
|
|
777
778
|
const index_vue_vue_type_style_index_0_lang$e = "";
|
|
778
|
-
const _sfc_main$
|
|
779
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
779
780
|
__name: "index",
|
|
780
781
|
setup(__props, { expose: __expose }) {
|
|
781
782
|
const attrs = vue.useAttrs();
|
|
@@ -800,7 +801,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
800
801
|
}
|
|
801
802
|
});
|
|
802
803
|
const index_vue_vue_type_style_index_0_lang$d = "";
|
|
803
|
-
const _sfc_main$
|
|
804
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
804
805
|
__name: "index",
|
|
805
806
|
setup(__props, { expose: __expose }) {
|
|
806
807
|
const attrs = vue.useAttrs();
|
|
@@ -825,7 +826,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
825
826
|
}
|
|
826
827
|
});
|
|
827
828
|
const index_vue_vue_type_style_index_0_lang$c = "";
|
|
828
|
-
const _sfc_main$
|
|
829
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
829
830
|
__name: "index",
|
|
830
831
|
setup(__props, { expose: __expose }) {
|
|
831
832
|
const attrs = vue.useAttrs();
|
|
@@ -850,7 +851,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
850
851
|
}
|
|
851
852
|
});
|
|
852
853
|
const index_vue_vue_type_style_index_0_lang$b = "";
|
|
853
|
-
const _sfc_main$
|
|
854
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
854
855
|
__name: "index",
|
|
855
856
|
setup(__props, { expose: __expose }) {
|
|
856
857
|
const proxyElement = vue.ref();
|
|
@@ -885,7 +886,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
885
886
|
}
|
|
886
887
|
});
|
|
887
888
|
const index_vue_vue_type_style_index_0_lang$a = "";
|
|
888
|
-
const _sfc_main$
|
|
889
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
889
890
|
__name: "index",
|
|
890
891
|
setup(__props, { expose: __expose }) {
|
|
891
892
|
const attrs = vue.useAttrs();
|
|
@@ -910,74 +911,259 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
910
911
|
}
|
|
911
912
|
});
|
|
912
913
|
const index_vue_vue_type_style_index_0_lang$9 = "";
|
|
914
|
+
const isInIframe = typeof window !== "undefined" && window.self !== window.top;
|
|
915
|
+
const COUNT_KEY = "__elDialogOverlayCount__";
|
|
916
|
+
let transitionDisabled = false;
|
|
917
|
+
let enableTimer = null;
|
|
918
|
+
const OVERLAY_TRANSITION_DURATION = 200;
|
|
919
|
+
function disableOverlayTransition() {
|
|
920
|
+
if (!isInIframe)
|
|
921
|
+
return;
|
|
922
|
+
if (enableTimer) {
|
|
923
|
+
clearTimeout(enableTimer);
|
|
924
|
+
enableTimer = null;
|
|
925
|
+
}
|
|
926
|
+
if (transitionDisabled)
|
|
927
|
+
return;
|
|
928
|
+
transitionDisabled = true;
|
|
929
|
+
document.documentElement.classList.add("gw-overlay-no-transition");
|
|
930
|
+
}
|
|
931
|
+
function enableOverlayTransition() {
|
|
932
|
+
if (!isInIframe || !transitionDisabled)
|
|
933
|
+
return;
|
|
934
|
+
if (enableTimer)
|
|
935
|
+
clearTimeout(enableTimer);
|
|
936
|
+
enableTimer = setTimeout(() => {
|
|
937
|
+
transitionDisabled = false;
|
|
938
|
+
document.documentElement.classList.remove("gw-overlay-no-transition");
|
|
939
|
+
enableTimer = null;
|
|
940
|
+
}, OVERLAY_TRANSITION_DURATION);
|
|
941
|
+
}
|
|
942
|
+
function getCount() {
|
|
943
|
+
return window[COUNT_KEY] || 0;
|
|
944
|
+
}
|
|
945
|
+
function setCount(count) {
|
|
946
|
+
window[COUNT_KEY] = count;
|
|
947
|
+
}
|
|
948
|
+
function postOverlayMessage(visible) {
|
|
949
|
+
if (!isInIframe)
|
|
950
|
+
return;
|
|
951
|
+
try {
|
|
952
|
+
window.parent.postMessage({ overlayMask: visible }, "*");
|
|
953
|
+
} catch (e) {
|
|
954
|
+
console.log(e);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
const globalOverlayVisible = vue.ref(false);
|
|
958
|
+
const globalOverlayZIndex = vue.ref(2e3);
|
|
959
|
+
function useOverlayMask() {
|
|
960
|
+
let hasCounted = false;
|
|
961
|
+
let isMounted = false;
|
|
962
|
+
function triggerOverlay(visible) {
|
|
963
|
+
if (!isInIframe)
|
|
964
|
+
return;
|
|
965
|
+
try {
|
|
966
|
+
let count = getCount();
|
|
967
|
+
if (visible) {
|
|
968
|
+
if (hasCounted)
|
|
969
|
+
return;
|
|
970
|
+
count++;
|
|
971
|
+
hasCounted = true;
|
|
972
|
+
} else {
|
|
973
|
+
if (!hasCounted)
|
|
974
|
+
return;
|
|
975
|
+
count = Math.max(0, count - 1);
|
|
976
|
+
hasCounted = false;
|
|
977
|
+
}
|
|
978
|
+
setCount(count);
|
|
979
|
+
const shouldShow = count > 0;
|
|
980
|
+
if (shouldShow) {
|
|
981
|
+
disableOverlayTransition();
|
|
982
|
+
} else {
|
|
983
|
+
enableOverlayTransition();
|
|
984
|
+
}
|
|
985
|
+
globalOverlayVisible.value = shouldShow;
|
|
986
|
+
postOverlayMessage(shouldShow);
|
|
987
|
+
} catch (e) {
|
|
988
|
+
console.log(e);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
function onOpen() {
|
|
992
|
+
if (hasCounted)
|
|
993
|
+
return;
|
|
994
|
+
triggerOverlay(true);
|
|
995
|
+
}
|
|
996
|
+
function onClose() {
|
|
997
|
+
triggerOverlay(false);
|
|
998
|
+
}
|
|
999
|
+
function onMount(modelValue) {
|
|
1000
|
+
isMounted = true;
|
|
1001
|
+
Promise.resolve().then(() => {
|
|
1002
|
+
if (isMounted && !hasCounted && modelValue === true) {
|
|
1003
|
+
onOpen();
|
|
1004
|
+
}
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
function onUnmount() {
|
|
1008
|
+
isMounted = false;
|
|
1009
|
+
if (hasCounted) {
|
|
1010
|
+
triggerOverlay(false);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
return {
|
|
1014
|
+
overlayVisible: globalOverlayVisible,
|
|
1015
|
+
overlayZIndex: globalOverlayZIndex,
|
|
1016
|
+
onOpen,
|
|
1017
|
+
onClose,
|
|
1018
|
+
onUnmount,
|
|
1019
|
+
onMount
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
const overlayMask = {
|
|
1023
|
+
show() {
|
|
1024
|
+
if (!isInIframe)
|
|
1025
|
+
return;
|
|
1026
|
+
try {
|
|
1027
|
+
let count = getCount();
|
|
1028
|
+
const wasZero = count === 0;
|
|
1029
|
+
count++;
|
|
1030
|
+
setCount(count);
|
|
1031
|
+
if (wasZero) {
|
|
1032
|
+
disableOverlayTransition();
|
|
1033
|
+
postOverlayMessage(true);
|
|
1034
|
+
}
|
|
1035
|
+
} catch (e) {
|
|
1036
|
+
console.log(e);
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
hide() {
|
|
1040
|
+
if (!isInIframe)
|
|
1041
|
+
return;
|
|
1042
|
+
try {
|
|
1043
|
+
let count = getCount();
|
|
1044
|
+
count = Math.max(0, count - 1);
|
|
1045
|
+
setCount(count);
|
|
1046
|
+
if (count === 0) {
|
|
1047
|
+
postOverlayMessage(false);
|
|
1048
|
+
enableOverlayTransition();
|
|
1049
|
+
}
|
|
1050
|
+
} catch (e) {
|
|
1051
|
+
console.log(e);
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
const GwOverlayMaskKey = "__gwOverlayMaskActive__";
|
|
1056
|
+
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
1057
|
+
__name: "index",
|
|
1058
|
+
props: {
|
|
1059
|
+
visible: { type: Boolean, default: false },
|
|
1060
|
+
backgroundColor: { default: "rgba(0, 0, 0, 0.5)" },
|
|
1061
|
+
width: { default: "100%" },
|
|
1062
|
+
height: { default: "100%" },
|
|
1063
|
+
transitionDuration: { default: "0.2s" }
|
|
1064
|
+
},
|
|
1065
|
+
emits: ["click"],
|
|
1066
|
+
setup(__props, { emit: __emit }) {
|
|
1067
|
+
const props = __props;
|
|
1068
|
+
const emit = __emit;
|
|
1069
|
+
const isInstance = !window[GwOverlayMaskKey];
|
|
1070
|
+
if (isInstance) {
|
|
1071
|
+
window[GwOverlayMaskKey] = true;
|
|
1072
|
+
}
|
|
1073
|
+
vue.onUnmounted(() => {
|
|
1074
|
+
if (isInstance) {
|
|
1075
|
+
window[GwOverlayMaskKey] = false;
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
const overlayStyle = vue.computed(() => ({
|
|
1079
|
+
position: "fixed",
|
|
1080
|
+
left: "0",
|
|
1081
|
+
top: "0",
|
|
1082
|
+
width: props.width,
|
|
1083
|
+
height: props.height,
|
|
1084
|
+
zIndex: 2e3,
|
|
1085
|
+
backgroundColor: props.backgroundColor,
|
|
1086
|
+
transitionDuration: props.transitionDuration
|
|
1087
|
+
}));
|
|
1088
|
+
const handleClick = (event) => {
|
|
1089
|
+
emit("click", event);
|
|
1090
|
+
};
|
|
1091
|
+
const handleMouseDown = (event) => {
|
|
1092
|
+
event.stopPropagation();
|
|
1093
|
+
};
|
|
1094
|
+
return (_ctx, _cache) => {
|
|
1095
|
+
return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
1096
|
+
isInstance ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1097
|
+
key: 0,
|
|
1098
|
+
class: vue.normalizeClass(["gw-overlay-mask", { "gw-overlay-mask--visible": __props.visible }]),
|
|
1099
|
+
style: vue.normalizeStyle(overlayStyle.value),
|
|
1100
|
+
onClick: handleClick,
|
|
1101
|
+
onMousedown: handleMouseDown
|
|
1102
|
+
}, null, 38)) : vue.createCommentVNode("", true)
|
|
1103
|
+
]);
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
const index_vue_vue_type_style_index_0_scoped_cf048b89_lang = "";
|
|
1108
|
+
const _export_sfc = (sfc, props) => {
|
|
1109
|
+
const target = sfc.__vccOpts || sfc;
|
|
1110
|
+
for (const [key, val] of props) {
|
|
1111
|
+
target[key] = val;
|
|
1112
|
+
}
|
|
1113
|
+
return target;
|
|
1114
|
+
};
|
|
1115
|
+
const GwOverlayMask = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-cf048b89"]]);
|
|
913
1116
|
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
914
1117
|
__name: "index",
|
|
915
1118
|
setup(__props, { expose: __expose }) {
|
|
916
|
-
vue.useAttrs();
|
|
1119
|
+
const attrs = vue.useAttrs();
|
|
917
1120
|
const proxyElement = vue.ref();
|
|
918
1121
|
const expose = useExpose(proxyElement);
|
|
919
1122
|
__expose(expose);
|
|
920
|
-
const
|
|
921
|
-
|
|
922
|
-
const dialogModal = vue.
|
|
923
|
-
function
|
|
1123
|
+
const { overlayVisible, overlayZIndex, onOpen, onClose, onUnmount, onMount } = useOverlayMask();
|
|
1124
|
+
const { nextZIndex } = elementPlus.useZIndex();
|
|
1125
|
+
const dialogModal = vue.computed(() => !isInIframe);
|
|
1126
|
+
function handleOpen() {
|
|
924
1127
|
if (isInIframe) {
|
|
925
1128
|
const currentCount = window.__elDialogOverlayCount__ || 0;
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
dialogModal.value = true;
|
|
929
|
-
}
|
|
930
|
-
triggerOverlay(true);
|
|
931
|
-
}
|
|
932
|
-
function onClose() {
|
|
933
|
-
triggerOverlay(false);
|
|
934
|
-
}
|
|
935
|
-
function triggerOverlay(visible) {
|
|
936
|
-
if (!isInIframe)
|
|
937
|
-
return;
|
|
938
|
-
try {
|
|
939
|
-
let count = window.__elDialogOverlayCount__ || 0;
|
|
940
|
-
if (visible) {
|
|
941
|
-
if (hasCounted)
|
|
942
|
-
return;
|
|
943
|
-
count++;
|
|
944
|
-
hasCounted = true;
|
|
945
|
-
} else {
|
|
946
|
-
if (!hasCounted)
|
|
947
|
-
return;
|
|
948
|
-
count = Math.max(0, count - 1);
|
|
949
|
-
hasCounted = false;
|
|
1129
|
+
if (currentCount === 0) {
|
|
1130
|
+
overlayZIndex.value = nextZIndex();
|
|
950
1131
|
}
|
|
951
|
-
;
|
|
952
|
-
window.__elDialogOverlayCount__ = count;
|
|
953
|
-
const shouldShow = count > 0;
|
|
954
|
-
window.parent.postMessage({ overlayMask: shouldShow }, "*");
|
|
955
|
-
} catch (e) {
|
|
956
|
-
console.log(e);
|
|
957
1132
|
}
|
|
1133
|
+
onOpen();
|
|
1134
|
+
}
|
|
1135
|
+
function handleClose() {
|
|
1136
|
+
onClose();
|
|
958
1137
|
}
|
|
1138
|
+
vue.onMounted(() => {
|
|
1139
|
+
onMount(attrs.modelValue);
|
|
1140
|
+
});
|
|
959
1141
|
vue.onUnmounted(() => {
|
|
960
|
-
|
|
961
|
-
triggerOverlay(false);
|
|
962
|
-
}
|
|
1142
|
+
onUnmount();
|
|
963
1143
|
});
|
|
964
1144
|
return (_ctx, _cache) => {
|
|
965
|
-
return vue.openBlock(), vue.
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1145
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1146
|
+
vue.unref(isInIframe) ? (vue.openBlock(), vue.createBlock(GwOverlayMask, {
|
|
1147
|
+
key: 0,
|
|
1148
|
+
visible: vue.unref(overlayVisible)
|
|
1149
|
+
}, null, 8, ["visible"])) : vue.createCommentVNode("", true),
|
|
1150
|
+
vue.createVNode(vue.unref(elementPlus.ElDialog), vue.mergeProps(_ctx.$attrs, {
|
|
1151
|
+
modal: dialogModal.value,
|
|
1152
|
+
ref_key: "proxyElement",
|
|
1153
|
+
ref: proxyElement,
|
|
1154
|
+
onOpen: handleOpen,
|
|
1155
|
+
onClose: handleClose
|
|
1156
|
+
}), vue.createSlots({ _: 2 }, [
|
|
1157
|
+
vue.renderList(_ctx.$slots, (value, key) => {
|
|
1158
|
+
return {
|
|
1159
|
+
name: key,
|
|
1160
|
+
fn: vue.withCtx((slotProps) => [
|
|
1161
|
+
vue.renderSlot(_ctx.$slots, key, vue.mergeProps(slotProps, { key }))
|
|
1162
|
+
])
|
|
1163
|
+
};
|
|
1164
|
+
})
|
|
1165
|
+
]), 1040, ["modal"])
|
|
1166
|
+
], 64);
|
|
981
1167
|
};
|
|
982
1168
|
}
|
|
983
1169
|
});
|
|
@@ -1059,6 +1245,64 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
1059
1245
|
});
|
|
1060
1246
|
const index_vue_vue_type_style_index_0_lang$5 = "";
|
|
1061
1247
|
const index$2 = "";
|
|
1248
|
+
function wrapMethod(fn) {
|
|
1249
|
+
return function(...args) {
|
|
1250
|
+
let hasHidden = false;
|
|
1251
|
+
const injectOptions = (options) => {
|
|
1252
|
+
const userBeforeClose = options == null ? void 0 : options.beforeClose;
|
|
1253
|
+
const wrappedBeforeClose = (action, instance, done) => {
|
|
1254
|
+
const wrappedDone = () => {
|
|
1255
|
+
if (!hasHidden) {
|
|
1256
|
+
hasHidden = true;
|
|
1257
|
+
overlayMask.hide();
|
|
1258
|
+
}
|
|
1259
|
+
done();
|
|
1260
|
+
};
|
|
1261
|
+
if (typeof userBeforeClose === "function") {
|
|
1262
|
+
userBeforeClose(action, instance, wrappedDone);
|
|
1263
|
+
} else {
|
|
1264
|
+
wrappedDone();
|
|
1265
|
+
}
|
|
1266
|
+
};
|
|
1267
|
+
return { ...options, beforeClose: wrappedBeforeClose };
|
|
1268
|
+
};
|
|
1269
|
+
if (args.length > 0 && typeof args[0] === "object" && !Array.isArray(args[0])) {
|
|
1270
|
+
args[0] = injectOptions(args[0]);
|
|
1271
|
+
} else {
|
|
1272
|
+
args[2] = injectOptions(args[2] || {});
|
|
1273
|
+
}
|
|
1274
|
+
overlayMask.show();
|
|
1275
|
+
const result = fn.apply(this, args);
|
|
1276
|
+
return result.finally(() => {
|
|
1277
|
+
if (!hasHidden) {
|
|
1278
|
+
hasHidden = true;
|
|
1279
|
+
overlayMask.hide();
|
|
1280
|
+
}
|
|
1281
|
+
});
|
|
1282
|
+
};
|
|
1283
|
+
}
|
|
1284
|
+
const wrappedMsgbox = wrapMethod(elementPlus.ElMessageBox);
|
|
1285
|
+
const wrappedAlert = wrapMethod(elementPlus.ElMessageBox.alert.bind(elementPlus.ElMessageBox));
|
|
1286
|
+
const wrappedConfirm = wrapMethod(elementPlus.ElMessageBox.confirm.bind(elementPlus.ElMessageBox));
|
|
1287
|
+
const wrappedPrompt = wrapMethod(elementPlus.ElMessageBox.prompt.bind(elementPlus.ElMessageBox));
|
|
1288
|
+
const WrappedElMessageBox = Object.assign(wrappedMsgbox, {
|
|
1289
|
+
alert: wrappedAlert,
|
|
1290
|
+
confirm: wrappedConfirm,
|
|
1291
|
+
prompt: wrappedPrompt,
|
|
1292
|
+
close: elementPlus.ElMessageBox.close.bind(elementPlus.ElMessageBox),
|
|
1293
|
+
_context: null
|
|
1294
|
+
});
|
|
1295
|
+
WrappedElMessageBox.install = function(app) {
|
|
1296
|
+
if (WrappedElMessageBox._installed)
|
|
1297
|
+
return;
|
|
1298
|
+
WrappedElMessageBox._installed = true;
|
|
1299
|
+
WrappedElMessageBox._context = app._context;
|
|
1300
|
+
app.config.globalProperties.$msgbox = WrappedElMessageBox;
|
|
1301
|
+
app.config.globalProperties.$messageBox = WrappedElMessageBox;
|
|
1302
|
+
app.config.globalProperties.$alert = wrappedAlert;
|
|
1303
|
+
app.config.globalProperties.$confirm = wrappedConfirm;
|
|
1304
|
+
app.config.globalProperties.$prompt = wrappedPrompt;
|
|
1305
|
+
};
|
|
1062
1306
|
const index$1 = "";
|
|
1063
1307
|
const install = elementPlus.ElNotification.install;
|
|
1064
1308
|
const defaultOption = {
|
|
@@ -1402,8 +1646,8 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
1402
1646
|
const index_vue_vue_type_style_index_0_lang = "";
|
|
1403
1647
|
const Adapter = {
|
|
1404
1648
|
// 基础组件
|
|
1405
|
-
ElButton: _sfc_main$
|
|
1406
|
-
ElTag: _sfc_main$
|
|
1649
|
+
ElButton: _sfc_main$H,
|
|
1650
|
+
ElTag: _sfc_main$G,
|
|
1407
1651
|
ElIcon: elementPlus.ElIcon,
|
|
1408
1652
|
ElAvatar: elementPlus.ElAvatar,
|
|
1409
1653
|
ElRow: elementPlus.ElRow,
|
|
@@ -1415,35 +1659,35 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
1415
1659
|
ElConfigProvider: elementPlus.ElConfigProvider,
|
|
1416
1660
|
ElScrollbar: elementPlus.ElScrollbar,
|
|
1417
1661
|
// 表单组件
|
|
1418
|
-
ElInput: _sfc_main$
|
|
1419
|
-
ElForm: _sfc_main$
|
|
1420
|
-
ElFormItem: _sfc_main$
|
|
1421
|
-
ElSelect: _sfc_main$
|
|
1422
|
-
ElOption: _sfc_main$
|
|
1423
|
-
ElCheckbox: _sfc_main$
|
|
1424
|
-
ElCheckboxGroup: _sfc_main$
|
|
1425
|
-
ElRadio: _sfc_main$
|
|
1426
|
-
ElRadioGroup: _sfc_main$
|
|
1427
|
-
ElRadioButton: _sfc_main$
|
|
1428
|
-
ElSwitch: _sfc_main$
|
|
1429
|
-
ElCascader: _sfc_main$
|
|
1430
|
-
ElDatePicker: _sfc_main$
|
|
1431
|
-
ElTimePicker: _sfc_main$
|
|
1432
|
-
ElUpload: _sfc_main$
|
|
1433
|
-
ElTransfer: _sfc_main$
|
|
1662
|
+
ElInput: _sfc_main$F,
|
|
1663
|
+
ElForm: _sfc_main$E,
|
|
1664
|
+
ElFormItem: _sfc_main$D,
|
|
1665
|
+
ElSelect: _sfc_main$C,
|
|
1666
|
+
ElOption: _sfc_main$B,
|
|
1667
|
+
ElCheckbox: _sfc_main$A,
|
|
1668
|
+
ElCheckboxGroup: _sfc_main$z,
|
|
1669
|
+
ElRadio: _sfc_main$y,
|
|
1670
|
+
ElRadioGroup: _sfc_main$x,
|
|
1671
|
+
ElRadioButton: _sfc_main$w,
|
|
1672
|
+
ElSwitch: _sfc_main$v,
|
|
1673
|
+
ElCascader: _sfc_main$u,
|
|
1674
|
+
ElDatePicker: _sfc_main$t,
|
|
1675
|
+
ElTimePicker: _sfc_main$s,
|
|
1676
|
+
ElUpload: _sfc_main$r,
|
|
1677
|
+
ElTransfer: _sfc_main$q,
|
|
1434
1678
|
// 数据展示
|
|
1435
|
-
ElTable: _sfc_main$
|
|
1436
|
-
ElTableColumn: _sfc_main$
|
|
1437
|
-
ElTree: _sfc_main$
|
|
1438
|
-
ElPagination: _sfc_main$
|
|
1439
|
-
ElImage: _sfc_main$
|
|
1440
|
-
ElProgress: _sfc_main$
|
|
1441
|
-
ElBadge: _sfc_main$
|
|
1442
|
-
ElCard: _sfc_main$
|
|
1443
|
-
ElDescriptions: _sfc_main$
|
|
1679
|
+
ElTable: _sfc_main$p,
|
|
1680
|
+
ElTableColumn: _sfc_main$o,
|
|
1681
|
+
ElTree: _sfc_main$n,
|
|
1682
|
+
ElPagination: _sfc_main$m,
|
|
1683
|
+
ElImage: _sfc_main$l,
|
|
1684
|
+
ElProgress: _sfc_main$k,
|
|
1685
|
+
ElBadge: _sfc_main$j,
|
|
1686
|
+
ElCard: _sfc_main$i,
|
|
1687
|
+
ElDescriptions: _sfc_main$h,
|
|
1444
1688
|
ElDescriptionsItem: elementPlus.ElDescriptionsItem,
|
|
1445
1689
|
// 反馈组件
|
|
1446
|
-
ElAlert: _sfc_main$
|
|
1690
|
+
ElAlert: _sfc_main$g,
|
|
1447
1691
|
ElDialog: _sfc_main$e,
|
|
1448
1692
|
ElDrawer: _sfc_main$d,
|
|
1449
1693
|
ElPopover: _sfc_main$c,
|
|
@@ -1471,7 +1715,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
1471
1715
|
app.component(key, component);
|
|
1472
1716
|
}
|
|
1473
1717
|
adapterLoading(app);
|
|
1474
|
-
app.use(
|
|
1718
|
+
app.use(WrappedElMessageBox);
|
|
1475
1719
|
app.use(ElNotification);
|
|
1476
1720
|
app.config.globalProperties.$message = elementPlus.ElMessage;
|
|
1477
1721
|
}
|