@ganwei-web/gw-base-components-plus 1.0.34 → 1.0.36

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.
@@ -915,13 +915,37 @@ const index_vue_vue_type_style_index_0_lang$9 = "";
915
915
  const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
916
916
  __name: "index",
917
917
  setup(__props, { expose: __expose }) {
918
+ const attrs = vue.useAttrs();
918
919
  const proxyElement = vue.ref();
919
920
  const expose = useExpose(proxyElement);
920
921
  __expose(expose);
922
+ let dialogCount = window.__elDialogOverlayCount__ || 0;
923
+ function triggerOverlay(visible) {
924
+ try {
925
+ if (visible) {
926
+ dialogCount++;
927
+ window.__elDialogOverlayCount__ = dialogCount;
928
+ } else {
929
+ dialogCount = Math.max(0, dialogCount - 1);
930
+ window.__elDialogOverlayCount__ = dialogCount;
931
+ }
932
+ const shouldShow = dialogCount > 0;
933
+ window.parent.postMessage({ overlayMask: shouldShow }, "*");
934
+ } catch (e) {
935
+ console.log(e);
936
+ }
937
+ }
938
+ vue.onUnmounted(() => {
939
+ if (attrs.modelValue) {
940
+ triggerOverlay(false);
941
+ }
942
+ });
921
943
  return (_ctx, _cache) => {
922
944
  return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDialog), vue.mergeProps(_ctx.$attrs, {
923
945
  ref_key: "proxyElement",
924
- ref: proxyElement
946
+ ref: proxyElement,
947
+ onOpen: _cache[0] || (_cache[0] = ($event) => triggerOverlay(true)),
948
+ onClose: _cache[1] || (_cache[1] = ($event) => triggerOverlay(false))
925
949
  }), vue.createSlots({ _: 2 }, [
926
950
  vue.renderList(_ctx.$slots, (value, key) => {
927
951
  return {
@@ -1358,6 +1382,16 @@ const Adapter = {
1358
1382
  // 基础组件
1359
1383
  ElButton: _sfc_main$G,
1360
1384
  ElTag: _sfc_main$F,
1385
+ ElIcon: elementPlus.ElIcon,
1386
+ ElAvatar: elementPlus.ElAvatar,
1387
+ ElRow: elementPlus.ElRow,
1388
+ // 布局组件
1389
+ ElContainer: elementPlus.ElContainer,
1390
+ ElHeader: elementPlus.ElHeader,
1391
+ ElAside: elementPlus.ElAside,
1392
+ ElMain: elementPlus.ElMain,
1393
+ ElConfigProvider: elementPlus.ElConfigProvider,
1394
+ ElScrollbar: elementPlus.ElScrollbar,
1361
1395
  // 表单组件
1362
1396
  ElInput: _sfc_main$E,
1363
1397
  ElForm: _sfc_main$D,
@@ -1399,12 +1433,16 @@ const Adapter = {
1399
1433
  ElDropdown: _sfc_main$9,
1400
1434
  ElDropdownMenu: _sfc_main$4,
1401
1435
  ElDropdownItem: _sfc_main$3,
1436
+ ElBreadcrumb: elementPlus.ElBreadcrumb,
1437
+ ElBreadcrumbItem: elementPlus.ElBreadcrumbItem,
1402
1438
  ElTabs: _sfc_main$8,
1403
1439
  ElTabPane: _sfc_main$7,
1404
1440
  // 其他
1405
1441
  ElCollapse: _sfc_main$2,
1406
1442
  ElCollapseItem: _sfc_main$1,
1407
- ElPoper: _sfc_main
1443
+ ElPoper: _sfc_main,
1444
+ ElTour: elementPlus.ElTour,
1445
+ ElTourStep: elementPlus.ElTourStep
1408
1446
  };
1409
1447
  function adapterInstall(app) {
1410
1448
  for (const [key, component] of Object.entries(Adapter)) {