@whitesev/pops 2.4.2 → 2.4.4

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
@@ -6558,6 +6558,7 @@
6558
6558
  height: window.innerHeight < 450 ? "70vh" : "500px",
6559
6559
  position: "center",
6560
6560
  animation: "pops-anim-fadein-zoom",
6561
+ useDeepMenuSwtichAnimation: true,
6561
6562
  zIndex: 10000,
6562
6563
  drag: false,
6563
6564
  dragLimit: true,
@@ -7242,6 +7243,7 @@
7242
7243
  /** 右侧容器 */
7243
7244
  $contentSectionContainer: null,
7244
7245
  },
7246
+ $config: {},
7245
7247
  /**
7246
7248
  * 初始化
7247
7249
  * @param details
@@ -7251,6 +7253,7 @@
7251
7253
  this.$el = {
7252
7254
  ...details.$el,
7253
7255
  };
7256
+ this.$config = details.config;
7254
7257
  this.asideULElement = this.$el.$contentAside.querySelector(`ul.pops-${PopsType}-aside-top-container`);
7255
7258
  this.asideBottomULElement = this.$el.$contentAside.querySelector(`ul.pops-${PopsType}-aside-bottom-container`);
7256
7259
  this.sectionContainerHeaderULElement =
@@ -9686,7 +9689,7 @@
9686
9689
  $deepMenuSection.remove();
9687
9690
  };
9688
9691
  // 返回上一层菜单
9689
- if (document.startViewTransition) {
9692
+ if (that.$config.useDeepMenuSwtichAnimation && document.startViewTransition) {
9690
9693
  const leaveTransition = document.startViewTransition(leaveViewTransition);
9691
9694
  await leaveTransition.ready;
9692
9695
  // 向右移出
@@ -9734,7 +9737,7 @@
9734
9737
  }
9735
9738
  that.$el.$sectionWrapper.appendChild($deepMenuSection);
9736
9739
  };
9737
- if (document.startViewTransition) {
9740
+ if (that.$config.useDeepMenuSwtichAnimation && document.startViewTransition) {
9738
9741
  const transition = document.startViewTransition(enterViewTransition);
9739
9742
  await transition.ready;
9740
9743
  await $deepMenuSection.animate([