@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.
@@ -1,5 +1,5 @@
1
- import { defineComponent, ref, useAttrs, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, mergeModels, useModel, createElementVNode, normalizeProps, guardReactiveProps, inject, createElementBlock, watch, resolveComponent, createVNode, isVNode } from "vue";
2
- import { ElButton, ElTag, ElInput, ElForm, ElFormItem, ElSelect, ElOption, ElCheckbox, ElCheckboxGroup, ElRadio, ElRadioGroup, ElRadioButton, ElSwitch, ElCascader, ElDatePicker, ElTimePicker, ElUpload, ElTransfer, ElTable, ElTableColumn, ElTree, localeContextKey, ElPagination, ElImage, ElProgress, ElBadge, ElCard, ElDescriptions, ElAlert, ElDialog, ElDrawer, ElPopover, ElTooltip, ElNotification as ElNotification$1, vLoading as vLoading$1, ElMenu, ElDropdown, ElTabs, ElTabPane, ElMenuItem, ElSubMenu, ElDropdownMenu, ElDropdownItem, ElCollapse, ElCollapseItem, ElDescriptionsItem, ElMessageBox, ElMessage } from "element-plus";
1
+ import { defineComponent, ref, useAttrs, computed, openBlock, createBlock, unref, mergeProps, createSlots, renderList, withCtx, renderSlot, mergeModels, useModel, createElementVNode, normalizeProps, guardReactiveProps, inject, createElementBlock, watch, resolveComponent, createVNode, onUnmounted, isVNode } from "vue";
2
+ import { ElButton, ElTag, ElInput, ElForm, ElFormItem, ElSelect, ElOption, ElCheckbox, ElCheckboxGroup, ElRadio, ElRadioGroup, ElRadioButton, ElSwitch, ElCascader, ElDatePicker, ElTimePicker, ElUpload, ElTransfer, ElTable, ElTableColumn, ElTree, localeContextKey, ElPagination, ElImage, ElProgress, ElBadge, ElCard, ElDescriptions, ElAlert, ElDialog, ElDrawer, ElPopover, ElTooltip, ElNotification as ElNotification$1, vLoading as vLoading$1, ElMenu, ElDropdown, ElTabs, ElTabPane, ElMenuItem, ElSubMenu, ElDropdownMenu, ElDropdownItem, ElCollapse, ElCollapseItem, ElIcon, ElAvatar, ElRow, ElContainer, ElHeader, ElAside, ElMain, ElConfigProvider, ElScrollbar, ElDescriptionsItem, ElBreadcrumb, ElBreadcrumbItem, ElTour, ElTourStep, ElMessageBox, ElMessage } from "element-plus";
3
3
  import { ElMessage as ElMessage2 } from "element-plus";
4
4
  function useExpose(proxyElement) {
5
5
  const expose = new Proxy({}, {
@@ -914,13 +914,37 @@ const index_vue_vue_type_style_index_0_lang$9 = "";
914
914
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
915
915
  __name: "index",
916
916
  setup(__props, { expose: __expose }) {
917
+ const attrs = useAttrs();
917
918
  const proxyElement = ref();
918
919
  const expose = useExpose(proxyElement);
919
920
  __expose(expose);
921
+ let dialogCount = window.__elDialogOverlayCount__ || 0;
922
+ function triggerOverlay(visible) {
923
+ try {
924
+ if (visible) {
925
+ dialogCount++;
926
+ window.__elDialogOverlayCount__ = dialogCount;
927
+ } else {
928
+ dialogCount = Math.max(0, dialogCount - 1);
929
+ window.__elDialogOverlayCount__ = dialogCount;
930
+ }
931
+ const shouldShow = dialogCount > 0;
932
+ window.parent.postMessage({ overlayMask: shouldShow }, "*");
933
+ } catch (e) {
934
+ console.log(e);
935
+ }
936
+ }
937
+ onUnmounted(() => {
938
+ if (attrs.modelValue) {
939
+ triggerOverlay(false);
940
+ }
941
+ });
920
942
  return (_ctx, _cache) => {
921
943
  return openBlock(), createBlock(unref(ElDialog), mergeProps(_ctx.$attrs, {
922
944
  ref_key: "proxyElement",
923
- ref: proxyElement
945
+ ref: proxyElement,
946
+ onOpen: _cache[0] || (_cache[0] = ($event) => triggerOverlay(true)),
947
+ onClose: _cache[1] || (_cache[1] = ($event) => triggerOverlay(false))
924
948
  }), createSlots({ _: 2 }, [
925
949
  renderList(_ctx.$slots, (value, key) => {
926
950
  return {
@@ -1357,6 +1381,16 @@ const Adapter = {
1357
1381
  // 基础组件
1358
1382
  ElButton: _sfc_main$G,
1359
1383
  ElTag: _sfc_main$F,
1384
+ ElIcon,
1385
+ ElAvatar,
1386
+ ElRow,
1387
+ // 布局组件
1388
+ ElContainer,
1389
+ ElHeader,
1390
+ ElAside,
1391
+ ElMain,
1392
+ ElConfigProvider,
1393
+ ElScrollbar,
1360
1394
  // 表单组件
1361
1395
  ElInput: _sfc_main$E,
1362
1396
  ElForm: _sfc_main$D,
@@ -1398,12 +1432,16 @@ const Adapter = {
1398
1432
  ElDropdown: _sfc_main$9,
1399
1433
  ElDropdownMenu: _sfc_main$4,
1400
1434
  ElDropdownItem: _sfc_main$3,
1435
+ ElBreadcrumb,
1436
+ ElBreadcrumbItem,
1401
1437
  ElTabs: _sfc_main$8,
1402
1438
  ElTabPane: _sfc_main$7,
1403
1439
  // 其他
1404
1440
  ElCollapse: _sfc_main$2,
1405
1441
  ElCollapseItem: _sfc_main$1,
1406
- ElPoper: _sfc_main
1442
+ ElPoper: _sfc_main,
1443
+ ElTour,
1444
+ ElTourStep
1407
1445
  };
1408
1446
  function adapterInstall(app) {
1409
1447
  for (const [key, component] of Object.entries(Adapter)) {