@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.umd.js CHANGED
@@ -3752,6 +3752,7 @@
3752
3752
  },
3753
3753
  animation: "pops-anim-fadein-zoom",
3754
3754
  forbiddenScroll: false,
3755
+ isAbsolute: false,
3755
3756
  style: null,
3756
3757
  addIndexCSS: true,
3757
3758
  };
@@ -3807,9 +3808,6 @@
3807
3808
  maskHTML: maskHTML,
3808
3809
  });
3809
3810
  $mask = _handleMask_.maskElement;
3810
- // 遮罩层必须是跟随主内容
3811
- // 即设置主内容position: relative,mask:position: absolute
3812
- popsDOMUtils.css($mask, "position", "absolute !important");
3813
3811
  elementList.push($mask);
3814
3812
  }
3815
3813
  let eventDetails = PopsHandler.handleLoadingEventDetails(guid, PopsType, $anim, $pops, $mask, config);
@@ -3823,6 +3821,12 @@
3823
3821
  popsElement: $pops,
3824
3822
  maskElement: $mask,
3825
3823
  });
3824
+ if (config.isAbsolute) {
3825
+ // 遮罩层必须是跟随主内容
3826
+ // 即设置主内容position: relative,mask:position: absolute
3827
+ popsDOMUtils.css($anim, "position", "absolute !important");
3828
+ $mask && popsDOMUtils.css($mask, "position", "absolute !important");
3829
+ }
3826
3830
  return PopsHandler.handleResultDetails(eventDetails);
3827
3831
  }
3828
3832
  }