@whitesev/pops 2.0.4 → 2.0.6

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/dist/index.cjs.js CHANGED
@@ -3748,6 +3748,7 @@ const PopsLoadingConfig = () => {
3748
3748
  },
3749
3749
  animation: "pops-anim-fadein-zoom",
3750
3750
  forbiddenScroll: false,
3751
+ isAbsolute: false,
3751
3752
  style: null,
3752
3753
  addIndexCSS: true,
3753
3754
  };
@@ -3803,9 +3804,6 @@ class PopsLoading {
3803
3804
  maskHTML: maskHTML,
3804
3805
  });
3805
3806
  $mask = _handleMask_.maskElement;
3806
- // 遮罩层必须是跟随主内容
3807
- // 即设置主内容position: relative,mask:position: absolute
3808
- popsDOMUtils.css($mask, "position", "absolute !important");
3809
3807
  elementList.push($mask);
3810
3808
  }
3811
3809
  let eventDetails = PopsHandler.handleLoadingEventDetails(guid, PopsType, $anim, $pops, $mask, config);
@@ -3819,6 +3817,12 @@ class PopsLoading {
3819
3817
  popsElement: $pops,
3820
3818
  maskElement: $mask,
3821
3819
  });
3820
+ if (config.isAbsolute) {
3821
+ // 遮罩层必须是跟随主内容
3822
+ // 即设置主内容position: relative,mask:position: absolute
3823
+ popsDOMUtils.css($anim, "position", "absolute !important");
3824
+ $mask && popsDOMUtils.css($mask, "position", "absolute !important");
3825
+ }
3822
3826
  return PopsHandler.handleResultDetails(eventDetails);
3823
3827
  }
3824
3828
  }