@ganwei-web/gw-base-components-plus 1.0.35 → 1.0.37
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 +65 -3
- package/element-plus-adapter/dist/ElementPlusAdapter.cjs.map +1 -1
- package/element-plus-adapter/dist/ElementPlusAdapter.iife.js +65 -3
- package/element-plus-adapter/dist/ElementPlusAdapter.iife.js.map +1 -1
- package/element-plus-adapter/dist/ElementPlusAdapter.js +67 -5
- package/element-plus-adapter/dist/ElementPlusAdapter.js.map +1 -1
- package/package.json +1 -1
|
@@ -913,13 +913,61 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
913
913
|
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
914
914
|
__name: "index",
|
|
915
915
|
setup(__props, { expose: __expose }) {
|
|
916
|
+
vue.useAttrs();
|
|
916
917
|
const proxyElement = vue.ref();
|
|
917
918
|
const expose = useExpose(proxyElement);
|
|
918
919
|
__expose(expose);
|
|
920
|
+
const isInIframe = window.self !== window.top;
|
|
921
|
+
let hasCounted = false;
|
|
922
|
+
const dialogModal = vue.ref(true);
|
|
923
|
+
function onOpen() {
|
|
924
|
+
if (isInIframe) {
|
|
925
|
+
const currentCount = window.__elDialogOverlayCount__ || 0;
|
|
926
|
+
dialogModal.value = currentCount === 0;
|
|
927
|
+
} else {
|
|
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;
|
|
950
|
+
}
|
|
951
|
+
;
|
|
952
|
+
window.__elDialogOverlayCount__ = count;
|
|
953
|
+
const shouldShow = count > 0;
|
|
954
|
+
window.parent.postMessage({ overlayMask: shouldShow }, "*");
|
|
955
|
+
} catch (e) {
|
|
956
|
+
console.log(e);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
vue.onUnmounted(() => {
|
|
960
|
+
if (hasCounted) {
|
|
961
|
+
triggerOverlay(false);
|
|
962
|
+
}
|
|
963
|
+
});
|
|
919
964
|
return (_ctx, _cache) => {
|
|
920
965
|
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDialog), vue.mergeProps(_ctx.$attrs, {
|
|
966
|
+
modal: dialogModal.value,
|
|
921
967
|
ref_key: "proxyElement",
|
|
922
|
-
ref: proxyElement
|
|
968
|
+
ref: proxyElement,
|
|
969
|
+
onOpen,
|
|
970
|
+
onClose
|
|
923
971
|
}), vue.createSlots({ _: 2 }, [
|
|
924
972
|
vue.renderList(_ctx.$slots, (value, key) => {
|
|
925
973
|
return {
|
|
@@ -929,7 +977,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
929
977
|
])
|
|
930
978
|
};
|
|
931
979
|
})
|
|
932
|
-
]), 1040);
|
|
980
|
+
]), 1040, ["modal"]);
|
|
933
981
|
};
|
|
934
982
|
}
|
|
935
983
|
});
|
|
@@ -1356,6 +1404,16 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
1356
1404
|
// 基础组件
|
|
1357
1405
|
ElButton: _sfc_main$G,
|
|
1358
1406
|
ElTag: _sfc_main$F,
|
|
1407
|
+
ElIcon: elementPlus.ElIcon,
|
|
1408
|
+
ElAvatar: elementPlus.ElAvatar,
|
|
1409
|
+
ElRow: elementPlus.ElRow,
|
|
1410
|
+
// 布局组件
|
|
1411
|
+
ElContainer: elementPlus.ElContainer,
|
|
1412
|
+
ElHeader: elementPlus.ElHeader,
|
|
1413
|
+
ElAside: elementPlus.ElAside,
|
|
1414
|
+
ElMain: elementPlus.ElMain,
|
|
1415
|
+
ElConfigProvider: elementPlus.ElConfigProvider,
|
|
1416
|
+
ElScrollbar: elementPlus.ElScrollbar,
|
|
1359
1417
|
// 表单组件
|
|
1360
1418
|
ElInput: _sfc_main$E,
|
|
1361
1419
|
ElForm: _sfc_main$D,
|
|
@@ -1397,12 +1455,16 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
|
|
|
1397
1455
|
ElDropdown: _sfc_main$9,
|
|
1398
1456
|
ElDropdownMenu: _sfc_main$4,
|
|
1399
1457
|
ElDropdownItem: _sfc_main$3,
|
|
1458
|
+
ElBreadcrumb: elementPlus.ElBreadcrumb,
|
|
1459
|
+
ElBreadcrumbItem: elementPlus.ElBreadcrumbItem,
|
|
1400
1460
|
ElTabs: _sfc_main$8,
|
|
1401
1461
|
ElTabPane: _sfc_main$7,
|
|
1402
1462
|
// 其他
|
|
1403
1463
|
ElCollapse: _sfc_main$2,
|
|
1404
1464
|
ElCollapseItem: _sfc_main$1,
|
|
1405
|
-
ElPoper: _sfc_main
|
|
1465
|
+
ElPoper: _sfc_main,
|
|
1466
|
+
ElTour: elementPlus.ElTour,
|
|
1467
|
+
ElTourStep: elementPlus.ElTourStep
|
|
1406
1468
|
};
|
|
1407
1469
|
function adapterInstall(app) {
|
|
1408
1470
|
for (const [key, component] of Object.entries(Adapter)) {
|