@whitesev/pops 2.4.2 → 2.4.5

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.esm.js CHANGED
@@ -6552,6 +6552,7 @@ const PopsPanelConfig = () => {
6552
6552
  height: window.innerHeight < 450 ? "70vh" : "500px",
6553
6553
  position: "center",
6554
6554
  animation: "pops-anim-fadein-zoom",
6555
+ useDeepMenuSwtichAnimation: true,
6555
6556
  zIndex: 10000,
6556
6557
  drag: false,
6557
6558
  dragLimit: true,
@@ -7236,6 +7237,7 @@ const PanelHandlerComponents = () => {
7236
7237
  /** 右侧容器 */
7237
7238
  $contentSectionContainer: null,
7238
7239
  },
7240
+ $config: {},
7239
7241
  /**
7240
7242
  * 初始化
7241
7243
  * @param details
@@ -7245,6 +7247,7 @@ const PanelHandlerComponents = () => {
7245
7247
  this.$el = {
7246
7248
  ...details.$el,
7247
7249
  };
7250
+ this.$config = details.config;
7248
7251
  this.asideULElement = this.$el.$contentAside.querySelector(`ul.pops-${PopsType}-aside-top-container`);
7249
7252
  this.asideBottomULElement = this.$el.$contentAside.querySelector(`ul.pops-${PopsType}-aside-bottom-container`);
7250
7253
  this.sectionContainerHeaderULElement =
@@ -9680,7 +9683,7 @@ const PanelHandlerComponents = () => {
9680
9683
  $deepMenuSection.remove();
9681
9684
  };
9682
9685
  // 返回上一层菜单
9683
- if (document.startViewTransition) {
9686
+ if (that.$config.useDeepMenuSwtichAnimation && document.startViewTransition) {
9684
9687
  const leaveTransition = document.startViewTransition(leaveViewTransition);
9685
9688
  await leaveTransition.ready;
9686
9689
  // 向右移出
@@ -9728,7 +9731,7 @@ const PanelHandlerComponents = () => {
9728
9731
  }
9729
9732
  that.$el.$sectionWrapper.appendChild($deepMenuSection);
9730
9733
  };
9731
- if (document.startViewTransition) {
9734
+ if (that.$config.useDeepMenuSwtichAnimation && document.startViewTransition) {
9732
9735
  const transition = document.startViewTransition(enterViewTransition);
9733
9736
  await transition.ready;
9734
9737
  await $deepMenuSection.animate([