vue-popup-plus 1.2.1 → 1.3.2

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.
@@ -356,7 +356,7 @@ declare type RenderConfigOptions = {
356
356
  /**
357
357
  * 点击遮罩层是否关闭弹出层,默认值为 false ,仅在 mask 为 true 时有效
358
358
  */
359
- maskClickCloseEnabled?: boolean;
359
+ maskClickClose?: boolean;
360
360
  /**
361
361
  * 弹出层是否禁用窗口滚动,默认值为 true
362
362
  */
@@ -480,6 +480,10 @@ declare type RenderStyleOptions = {
480
480
  * minHeight: 300,
481
481
  */
482
482
  minHeight?: string | number;
483
+ /**
484
+ * 弹出层视图动画类型,默认为 POPUP_ANIMATIONS.FADE ,即淡入淡出,更多动画类型请查看 {@link IAnimations}
485
+ */
486
+ viewAnimation?: Animation_2;
483
487
  /**
484
488
  * 弹出层视图水平偏移量,默认为 0 ,单位为 px
485
489
  */
@@ -493,17 +497,17 @@ declare type RenderStyleOptions = {
493
497
  */
494
498
  viewTranslateOverflow?: boolean;
495
499
  /**
496
- * 弹出层动画时长,默认为 100 ,单位为 毫秒
500
+ * 弹出层遮罩动画类型,默认为 POPUP_ANIMATIONS.FADE ,即淡入淡出,更多动画类型请查看 {@link IAnimations}
497
501
  */
498
- animationDuration?: number;
502
+ maskAnimation?: Animation_2;
499
503
  /**
500
- * 遮罩层动画类型,默认为 POPUP_ANIMATIONS.FADE ,即淡入淡出,更多动画类型请查看 {@link IAnimations}
504
+ * 弹出层遮罩是否启用模糊效果,默认为 true
501
505
  */
502
- maskAnimation?: Animation_2;
506
+ maskBlur?: boolean;
503
507
  /**
504
- * 视图层动画类型,默认为 POPUP_ANIMATIONS.FADE ,即淡入淡出,更多动画类型请查看 {@link IAnimations}
508
+ * 弹出层动画时长,默认为 100 ,单位为 毫秒
505
509
  */
506
- viewAnimation?: Animation_2;
510
+ animationDuration?: number;
507
511
  /**
508
512
  * 弹出层 zIndex ,若不设置,则使用全局递增的 zIndex 值
509
513
  */
@@ -1,40 +1,40 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".vue-popup-plus-animation-enter-fade[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-fade-90654c9b}.vue-popup-plus-animation-leave-fade[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-fade-90654c9b}.vue-popup-plus-animation-enter-scale-enlarge[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-scale-enlarge-90654c9b}.vue-popup-plus-animation-leave-scale-enlarge[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-scale-enlarge-90654c9b}.vue-popup-plus-animation-enter-scale-shrink[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-scale-shrink-90654c9b}.vue-popup-plus-animation-leave-scale-shrink[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-scale-shrink-90654c9b}.vue-popup-plus-animation-enter-fly-top[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-fly-top-90654c9b}.vue-popup-plus-animation-leave-fly-top[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-fly-top-90654c9b}.vue-popup-plus-animation-enter-fly-left[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-fly-left-90654c9b}.vue-popup-plus-animation-leave-fly-left[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-fly-left-90654c9b}.vue-popup-plus-animation-enter-fly-right[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-fly-right-90654c9b}.vue-popup-plus-animation-leave-fly-right[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-fly-right-90654c9b}.vue-popup-plus-animation-enter-fly-bottom[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-fly-bottom-90654c9b}.vue-popup-plus-animation-leave-fly-bottom[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-fly-bottom-90654c9b}@-moz-keyframes vue-popup-plus-animation-enter-fade-90654c9b{0%{opacity:0}to{opacity:1}}@-webkit-keyframes vue-popup-plus-animation-enter-fade-90654c9b{0%{opacity:0}to{opacity:1}}@-o-keyframes vue-popup-plus-animation-enter-fade-90654c9b{0%{opacity:0}to{opacity:1}}@keyframes vue-popup-plus-animation-enter-fade-90654c9b{0%{opacity:0}to{opacity:1}}@-moz-keyframes vue-popup-plus-animation-leave-fade-90654c9b{0%{opacity:1}to{opacity:0}}@-webkit-keyframes vue-popup-plus-animation-leave-fade-90654c9b{0%{opacity:1}to{opacity:0}}@-o-keyframes vue-popup-plus-animation-leave-fade-90654c9b{0%{opacity:1}to{opacity:0}}@keyframes vue-popup-plus-animation-leave-fade-90654c9b{0%{opacity:1}to{opacity:0}}@-moz-keyframes vue-popup-plus-animation-enter-scale-enlarge-90654c9b{0%{transform:scale(0)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-enlarge-90654c9b{0%{transform:scale(0)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-enlarge-90654c9b{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-enlarge-90654c9b{0%{transform:scale(0)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-enlarge-90654c9b{0%{transform:scale(1)}to{transform:scale(0)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-enlarge-90654c9b{0%{transform:scale(1)}to{transform:scale(0)}}@-o-keyframes vue-popup-plus-animation-leave-scale-enlarge-90654c9b{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes vue-popup-plus-animation-leave-scale-enlarge-90654c9b{0%{transform:scale(1)}to{transform:scale(0)}}@-moz-keyframes vue-popup-plus-animation-enter-scale-shrink-90654c9b{0%{transform:scale(5)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-shrink-90654c9b{0%{transform:scale(5)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-shrink-90654c9b{0%{transform:scale(5)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-shrink-90654c9b{0%{transform:scale(5)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-shrink-90654c9b{0%{transform:scale(1)}to{transform:scale(5)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-shrink-90654c9b{0%{transform:scale(1)}to{transform:scale(5)}}@-o-keyframes vue-popup-plus-animation-leave-scale-shrink-90654c9b{0%{transform:scale(1)}to{transform:scale(5)}}@keyframes vue-popup-plus-animation-leave-scale-shrink-90654c9b{0%{transform:scale(1)}to{transform:scale(5)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-top-90654c9b{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-top-90654c9b{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-top-90654c9b{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-top-90654c9b{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-top-90654c9b{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-top-90654c9b{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-top-90654c9b{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@keyframes vue-popup-plus-animation-leave-fly-top-90654c9b{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-left-90654c9b{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-left-90654c9b{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-left-90654c9b{0%{transform:translate(-100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-left-90654c9b{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-left-90654c9b{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-left-90654c9b{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-left-90654c9b{0%{transform:translate(0)}to{transform:translate(-100vw)}}@keyframes vue-popup-plus-animation-leave-fly-left-90654c9b{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-right-90654c9b{0%{transform:translate(100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-right-90654c9b{0%{transform:translate(100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-right-90654c9b{0%{transform:translate(100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-right-90654c9b{0%{transform:translate(100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-right-90654c9b{0%{transform:translate(0)}to{transform:translate(100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-right-90654c9b{0%{transform:translate(0)}to{transform:translate(100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-right-90654c9b{0%{transform:translate(0)}to{transform:translate(100vw)}}@keyframes vue-popup-plus-animation-leave-fly-right-90654c9b{0%{transform:translate(0)}to{transform:translate(100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-bottom-90654c9b{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-bottom-90654c9b{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-bottom-90654c9b{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-bottom-90654c9b{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-bottom-90654c9b{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-bottom-90654c9b{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-bottom-90654c9b{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@keyframes vue-popup-plus-animation-leave-fly-bottom-90654c9b{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.popup-mask[data-v-90654c9b]{position:fixed;inset:0;background-color:#0000004d}.vue-popup-plus-animation-enter-fade[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-fade-ef218a67}.vue-popup-plus-animation-leave-fade[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-fade-ef218a67}.vue-popup-plus-animation-enter-scale-enlarge[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-scale-enlarge-ef218a67}.vue-popup-plus-animation-leave-scale-enlarge[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-scale-enlarge-ef218a67}.vue-popup-plus-animation-enter-scale-shrink[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-scale-shrink-ef218a67}.vue-popup-plus-animation-leave-scale-shrink[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-scale-shrink-ef218a67}.vue-popup-plus-animation-enter-fly-top[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-fly-top-ef218a67}.vue-popup-plus-animation-leave-fly-top[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-fly-top-ef218a67}.vue-popup-plus-animation-enter-fly-left[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-fly-left-ef218a67}.vue-popup-plus-animation-leave-fly-left[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-fly-left-ef218a67}.vue-popup-plus-animation-enter-fly-right[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-fly-right-ef218a67}.vue-popup-plus-animation-leave-fly-right[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-fly-right-ef218a67}.vue-popup-plus-animation-enter-fly-bottom[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-fly-bottom-ef218a67}.vue-popup-plus-animation-leave-fly-bottom[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-fly-bottom-ef218a67}@-moz-keyframes vue-popup-plus-animation-enter-fade-ef218a67{0%{opacity:0}to{opacity:1}}@-webkit-keyframes vue-popup-plus-animation-enter-fade-ef218a67{0%{opacity:0}to{opacity:1}}@-o-keyframes vue-popup-plus-animation-enter-fade-ef218a67{0%{opacity:0}to{opacity:1}}@keyframes vue-popup-plus-animation-enter-fade-ef218a67{0%{opacity:0}to{opacity:1}}@-moz-keyframes vue-popup-plus-animation-leave-fade-ef218a67{0%{opacity:1}to{opacity:0}}@-webkit-keyframes vue-popup-plus-animation-leave-fade-ef218a67{0%{opacity:1}to{opacity:0}}@-o-keyframes vue-popup-plus-animation-leave-fade-ef218a67{0%{opacity:1}to{opacity:0}}@keyframes vue-popup-plus-animation-leave-fade-ef218a67{0%{opacity:1}to{opacity:0}}@-moz-keyframes vue-popup-plus-animation-enter-scale-enlarge-ef218a67{0%{transform:scale(0)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-enlarge-ef218a67{0%{transform:scale(0)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-enlarge-ef218a67{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-enlarge-ef218a67{0%{transform:scale(0)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-enlarge-ef218a67{0%{transform:scale(1)}to{transform:scale(0)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-enlarge-ef218a67{0%{transform:scale(1)}to{transform:scale(0)}}@-o-keyframes vue-popup-plus-animation-leave-scale-enlarge-ef218a67{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes vue-popup-plus-animation-leave-scale-enlarge-ef218a67{0%{transform:scale(1)}to{transform:scale(0)}}@-moz-keyframes vue-popup-plus-animation-enter-scale-shrink-ef218a67{0%{transform:scale(5)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-shrink-ef218a67{0%{transform:scale(5)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-shrink-ef218a67{0%{transform:scale(5)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-shrink-ef218a67{0%{transform:scale(5)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-shrink-ef218a67{0%{transform:scale(1)}to{transform:scale(5)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-shrink-ef218a67{0%{transform:scale(1)}to{transform:scale(5)}}@-o-keyframes vue-popup-plus-animation-leave-scale-shrink-ef218a67{0%{transform:scale(1)}to{transform:scale(5)}}@keyframes vue-popup-plus-animation-leave-scale-shrink-ef218a67{0%{transform:scale(1)}to{transform:scale(5)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-top-ef218a67{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-top-ef218a67{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-top-ef218a67{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-top-ef218a67{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-top-ef218a67{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-top-ef218a67{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-top-ef218a67{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@keyframes vue-popup-plus-animation-leave-fly-top-ef218a67{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-left-ef218a67{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-left-ef218a67{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-left-ef218a67{0%{transform:translate(-100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-left-ef218a67{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-left-ef218a67{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-left-ef218a67{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-left-ef218a67{0%{transform:translate(0)}to{transform:translate(-100vw)}}@keyframes vue-popup-plus-animation-leave-fly-left-ef218a67{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-right-ef218a67{0%{transform:translate(100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-right-ef218a67{0%{transform:translate(100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-right-ef218a67{0%{transform:translate(100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-right-ef218a67{0%{transform:translate(100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-right-ef218a67{0%{transform:translate(0)}to{transform:translate(100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-right-ef218a67{0%{transform:translate(0)}to{transform:translate(100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-right-ef218a67{0%{transform:translate(0)}to{transform:translate(100vw)}}@keyframes vue-popup-plus-animation-leave-fly-right-ef218a67{0%{transform:translate(0)}to{transform:translate(100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-bottom-ef218a67{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-bottom-ef218a67{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-bottom-ef218a67{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-bottom-ef218a67{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-bottom-ef218a67{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-bottom-ef218a67{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-bottom-ef218a67{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@keyframes vue-popup-plus-animation-leave-fly-bottom-ef218a67{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.popup-view-wrapper[data-v-ef218a67]{position:fixed;inset:0;display:flex;justify-content:center;align-items:center;pointer-events:none}.popup-view-wrapper .popup-view[data-v-ef218a67]{position:relative;margin:auto;pointer-events:auto}.vue-popup-plus-animation{animation-timing-function:linear;animation-duration:var(--v9a56ef92)}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { defineComponent as P, inject as v, createElementBlock as N, openBlock as p, normalizeStyle as g, unref as d, ref as m, computed as r, defineAsyncComponent as V, provide as C, onMounted as b, onUpdated as W, nextTick as H, createElementVNode as U, createBlock as A, resolveDynamicComponent as L, mergeProps as B, useCssVars as F, Transition as X, withCtx as I, renderSlot as z, createCommentVNode as D, Fragment as j, createVNode as w, createApp as G, render as O, toRefs as J, reactive as q } from "vue";
3
- const S = "vue-popup-plus", y = {
4
- INSTANCE_ID: Symbol(`${S}-instance-id`),
5
- COMPUTED_VIEW_STYLE: Symbol(`${S}-computed-view-style`)
6
- }, E = {
7
- INSTANCE_STORE: Symbol(`${S}-instance-store`)
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".popup-mask[data-v-53a2b502]{position:fixed;inset:0;background-color:var(--popup-color-mask)}.popup-mask.is-blur[data-v-53a2b502]{-webkit-backdrop-filter:blur(15px) saturate(180%);backdrop-filter:blur(15px) saturate(180%)}.popup-view-wrapper[data-v-13c586d7]{position:fixed;inset:0;display:flex;justify-content:center;align-items:center;pointer-events:none}.popup-view-wrapper .popup-view[data-v-13c586d7]{position:relative;margin:auto;pointer-events:auto}.vue-popup-plus-animation{animation-timing-function:linear;animation-duration:var(--v9a56ef92)}.vue-popup-plus-animation-enter-fade{animation-name:vue-popup-plus-animation-enter-fade}.vue-popup-plus-animation-leave-fade{animation-name:vue-popup-plus-animation-leave-fade}.vue-popup-plus-animation-enter-scale-enlarge{animation-name:vue-popup-plus-animation-enter-scale-enlarge}.vue-popup-plus-animation-leave-scale-enlarge{animation-name:vue-popup-plus-animation-leave-scale-enlarge}.vue-popup-plus-animation-enter-scale-shrink{animation-name:vue-popup-plus-animation-enter-scale-shrink}.vue-popup-plus-animation-leave-scale-shrink{animation-name:vue-popup-plus-animation-leave-scale-shrink}.vue-popup-plus-animation-enter-fly-top{animation-name:vue-popup-plus-animation-enter-fly-top}.vue-popup-plus-animation-leave-fly-top{animation-name:vue-popup-plus-animation-leave-fly-top}.vue-popup-plus-animation-enter-fly-left{animation-name:vue-popup-plus-animation-enter-fly-left}.vue-popup-plus-animation-leave-fly-left{animation-name:vue-popup-plus-animation-leave-fly-left}.vue-popup-plus-animation-enter-fly-right{animation-name:vue-popup-plus-animation-enter-fly-right}.vue-popup-plus-animation-leave-fly-right{animation-name:vue-popup-plus-animation-leave-fly-right}.vue-popup-plus-animation-enter-fly-bottom{animation-name:vue-popup-plus-animation-enter-fly-bottom}.vue-popup-plus-animation-leave-fly-bottom{animation-name:vue-popup-plus-animation-leave-fly-bottom}@-moz-keyframes vue-popup-plus-animation-enter-fade{0%{opacity:0}to{opacity:1}}@-webkit-keyframes vue-popup-plus-animation-enter-fade{0%{opacity:0}to{opacity:1}}@-o-keyframes vue-popup-plus-animation-enter-fade{0%{opacity:0}to{opacity:1}}@keyframes vue-popup-plus-animation-enter-fade{0%{opacity:0}to{opacity:1}}@-moz-keyframes vue-popup-plus-animation-leave-fade{0%{opacity:1}to{opacity:0}}@-webkit-keyframes vue-popup-plus-animation-leave-fade{0%{opacity:1}to{opacity:0}}@-o-keyframes vue-popup-plus-animation-leave-fade{0%{opacity:1}to{opacity:0}}@keyframes vue-popup-plus-animation-leave-fade{0%{opacity:1}to{opacity:0}}@-moz-keyframes vue-popup-plus-animation-enter-scale-enlarge{0%{transform:scale(0)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-enlarge{0%{transform:scale(0)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-enlarge{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-enlarge{0%{transform:scale(0)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-enlarge{0%{transform:scale(1)}to{transform:scale(0)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-enlarge{0%{transform:scale(1)}to{transform:scale(0)}}@-o-keyframes vue-popup-plus-animation-leave-scale-enlarge{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes vue-popup-plus-animation-leave-scale-enlarge{0%{transform:scale(1)}to{transform:scale(0)}}@-moz-keyframes vue-popup-plus-animation-enter-scale-shrink{0%{transform:scale(5)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-shrink{0%{transform:scale(5)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-shrink{0%{transform:scale(5)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-shrink{0%{transform:scale(5)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-shrink{0%{transform:scale(1)}to{transform:scale(5)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-shrink{0%{transform:scale(1)}to{transform:scale(5)}}@-o-keyframes vue-popup-plus-animation-leave-scale-shrink{0%{transform:scale(1)}to{transform:scale(5)}}@keyframes vue-popup-plus-animation-leave-scale-shrink{0%{transform:scale(1)}to{transform:scale(5)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-top{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-top{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-top{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-top{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-top{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-top{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-top{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@keyframes vue-popup-plus-animation-leave-fly-top{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-left{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-left{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-left{0%{transform:translate(-100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-left{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-left{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-left{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-left{0%{transform:translate(0)}to{transform:translate(-100vw)}}@keyframes vue-popup-plus-animation-leave-fly-left{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-right{0%{transform:translate(100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-right{0%{transform:translate(100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-right{0%{transform:translate(100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-right{0%{transform:translate(100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-right{0%{transform:translate(0)}to{transform:translate(100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-right{0%{transform:translate(0)}to{transform:translate(100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-right{0%{transform:translate(0)}to{transform:translate(100vw)}}@keyframes vue-popup-plus-animation-leave-fly-right{0%{transform:translate(0)}to{transform:translate(100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-bottom{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-bottom{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-bottom{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-bottom{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-bottom{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-bottom{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-bottom{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@keyframes vue-popup-plus-animation-leave-fly-bottom{0%{transform:translateY(0)}to{transform:translateY(100vh)}}:root{--popup-color-mask: rgba(175,175,175,.3);--popup-color-mask-dark-lite: rgba(158,158,158,.3);--popup-color-mask-dark: rgba(131,131,131,.3);--popup-color-mask-dark-most: rgba(70,70,70,.3);--popup-color-mask-light-lite: rgba(183,183,183,.3);--popup-color-mask-light: rgba(195,195,195,.3);--popup-color-mask-light-most: rgba(223,223,223,.3)}.dark{--popup-color-mask: rgba(75,75,75,.3);--popup-color-mask-dark-lite: rgba(68,68,68,.3);--popup-color-mask-dark: rgba(56,56,56,.3);--popup-color-mask-dark-most: rgba(30,30,30,.3);--popup-color-mask-light-lite: rgba(93,93,93,.3);--popup-color-mask-light: rgba(120,120,120,.3);--popup-color-mask-light-most: rgba(183,183,183,.3)}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { defineComponent as P, inject as v, createElementBlock as N, openBlock as d, normalizeStyle as g, normalizeClass as V, unref as p, ref as m, computed as r, defineAsyncComponent as W, provide as E, onMounted as b, onUpdated as B, nextTick as H, createElementVNode as U, createBlock as A, resolveDynamicComponent as L, mergeProps as F, useCssVars as z, Transition as X, withCtx as S, renderSlot as j, createCommentVNode as D, Fragment as G, createVNode as w, createApp as J, render as O, toRefs as q, reactive as K } from "vue";
3
+ const I = "vue-popup-plus", y = {
4
+ INSTANCE_ID: Symbol(`${I}-instance-id`),
5
+ COMPUTED_VIEW_STYLE: Symbol(`${I}-computed-view-style`)
6
+ }, T = {
7
+ INSTANCE_STORE: Symbol(`${I}-instance-store`)
8
8
  };
9
- function K(n) {
9
+ function Q(n = 0) {
10
10
  return new Promise((e) => {
11
- setTimeout(e, n);
11
+ window.setTimeout(e, n);
12
12
  });
13
13
  }
14
- const Q = /* @__PURE__ */ P({
14
+ const Z = /* @__PURE__ */ P({
15
15
  name: "PopupMask",
16
16
  __name: "PopupMask",
17
17
  setup(n) {
18
- const e = v(y.INSTANCE_ID), o = v(E.INSTANCE_STORE);
18
+ const e = v(y.INSTANCE_ID), o = v(T.INSTANCE_STORE);
19
19
  function t() {
20
- o.maskClickCloseEnabled && ve().destroy(e);
20
+ o.maskClickClose && fe().destroy(e);
21
21
  }
22
- return (i, s) => (p(), N("div", {
23
- class: "popup-mask",
24
- style: g({ zIndex: d(o).zIndex.value }),
22
+ return (i, s) => (d(), N("div", {
23
+ class: V(["popup-mask", { "is-blur": p(o).maskBlur.value }]),
24
+ style: g({ zIndex: p(o).zIndex.value }),
25
25
  onClick: t
26
- }, null, 4));
26
+ }, null, 6));
27
27
  }
28
28
  }), M = (n, e) => {
29
29
  const o = n.__vccOpts || n;
30
30
  for (const [t, i] of e)
31
31
  o[t] = i;
32
32
  return o;
33
- }, Z = /* @__PURE__ */ M(Q, [["__scopeId", "data-v-90654c9b"]]), ee = /* @__PURE__ */ P({
33
+ }, ee = /* @__PURE__ */ M(Z, [["__scopeId", "data-v-53a2b502"]]), te = /* @__PURE__ */ P({
34
34
  name: "PopupView",
35
35
  __name: "PopupView",
36
36
  setup(n) {
37
- const e = m(), o = v(y.INSTANCE_ID), t = v(E.INSTANCE_STORE), i = m(0), s = m(0), u = r(() => typeof t.component == "function" ? V(t.component) : t.component), h = r(() => t.viewTranslateOverflow.value ? t.viewTranslateX.value : t.viewTranslateX.value > 0 ? Math.min(
37
+ const e = m(), o = v(y.INSTANCE_ID), t = v(T.INSTANCE_STORE), i = m(0), s = m(0), u = r(() => typeof t.component == "function" ? W(t.component) : t.component), h = r(() => t.viewTranslateOverflow.value ? t.viewTranslateX.value : t.viewTranslateX.value > 0 ? Math.min(
38
38
  t.viewTranslateX.value,
39
39
  (window.innerWidth - i.value) / 2
40
40
  ) : Math.max(
@@ -46,7 +46,7 @@ const Q = /* @__PURE__ */ P({
46
46
  ) : Math.max(
47
47
  t.viewTranslateY.value,
48
48
  -(window.innerHeight - s.value) / 2
49
- )), T = r(() => ({
49
+ )), x = r(() => ({
50
50
  width: c(t.width.value),
51
51
  maxWidth: c(t.maxWidth.value),
52
52
  minWidth: c(t.minWidth.value),
@@ -61,9 +61,9 @@ const Q = /* @__PURE__ */ P({
61
61
  translateX: h.value,
62
62
  translateY: _.value
63
63
  }));
64
- C(y.COMPUTED_VIEW_STYLE, R), b(() => {
64
+ E(y.COMPUTED_VIEW_STYLE, R), b(() => {
65
65
  window.setTimeout(k, t.animationDuration.value);
66
- }), W(() => {
66
+ }), B(() => {
67
67
  k();
68
68
  });
69
69
  async function k() {
@@ -74,23 +74,23 @@ const Q = /* @__PURE__ */ P({
74
74
  function c(a) {
75
75
  return typeof a == "number" ? `${a}px` : a;
76
76
  }
77
- return (a, fe) => (p(), N("div", {
77
+ return (a, _e) => (d(), N("div", {
78
78
  class: "popup-view-wrapper",
79
- style: g({ zIndex: d(t).zIndex.value })
79
+ style: g({ zIndex: p(t).zIndex.value })
80
80
  }, [
81
81
  U("div", {
82
82
  class: "popup-view",
83
- style: g(T.value),
83
+ style: g(x.value),
84
84
  ref_key: "popupViewRef",
85
85
  ref: e
86
86
  }, [
87
- (p(), A(L(u.value), B({
88
- key: `${d(o).name}-component`
89
- }, d(t).componentProps), null, 16))
87
+ (d(), A(L(u.value), F({
88
+ key: `${p(o).name}-component`
89
+ }, p(t).componentProps), null, 16))
90
90
  ], 4)
91
91
  ], 4));
92
92
  }
93
- }), te = /* @__PURE__ */ M(ee, [["__scopeId", "data-v-ef218a67"]]), $ = /* @__PURE__ */ P({
93
+ }), ne = /* @__PURE__ */ M(te, [["__scopeId", "data-v-13c586d7"]]), $ = /* @__PURE__ */ P({
94
94
  name: "PopupAnimation",
95
95
  __name: "PopupAnimation",
96
96
  props: {
@@ -98,22 +98,22 @@ const Q = /* @__PURE__ */ P({
98
98
  duration: {}
99
99
  },
100
100
  setup(n) {
101
- F((u) => ({
101
+ z((u) => ({
102
102
  v9a56ef92: s.value
103
103
  }));
104
- const e = v(E.INSTANCE_STORE), o = m(!1), t = r(
104
+ const e = v(T.INSTANCE_STORE), o = m(!1), t = r(
105
105
  () => `vue-popup-plus-animation vue-popup-plus-animation-enter-${n.type}`
106
106
  ), i = r(
107
107
  () => `vue-popup-plus-animation vue-popup-plus-animation-leave-${n.type}`
108
108
  ), s = r(() => `${n.duration}ms`);
109
109
  return b(() => {
110
110
  o.value = !0;
111
- }), (u, h) => (p(), A(X, {
111
+ }), (u, h) => (d(), A(X, {
112
112
  "enter-active-class": t.value,
113
113
  "leave-active-class": i.value
114
114
  }, {
115
- default: I(() => [
116
- o.value && !d(e).isBeforeUnmount.value ? z(u.$slots, "default", {
115
+ default: S(() => [
116
+ o.value && !p(e).isBeforeUnmount.value ? j(u.$slots, "default", {
117
117
  key: 0,
118
118
  style: g({ animationDuration: `${n.duration}ms` })
119
119
  }) : D("", !0)
@@ -121,63 +121,63 @@ const Q = /* @__PURE__ */ P({
121
121
  _: 3
122
122
  }, 8, ["enter-active-class", "leave-active-class"]));
123
123
  }
124
- }), x = /* @__PURE__ */ P({
124
+ }), C = /* @__PURE__ */ P({
125
125
  name: "Popup",
126
126
  __name: "Popup",
127
127
  props: {
128
128
  store: {}
129
129
  },
130
130
  setup(n) {
131
- return C(y.INSTANCE_ID, n.store.id), C(E.INSTANCE_STORE, n.store), (e, o) => (p(), N(j, null, [
132
- n.store.mask ? (p(), A($, {
131
+ return E(y.INSTANCE_ID, n.store.id), E(T.INSTANCE_STORE, n.store), (e, o) => (d(), N(G, null, [
132
+ n.store.mask ? (d(), A($, {
133
133
  key: 0,
134
134
  duration: n.store.animationDuration.value,
135
135
  type: n.store.maskAnimation.value
136
136
  }, {
137
- default: I(() => [
138
- w(Z)
137
+ default: S(() => [
138
+ w(ee)
139
139
  ]),
140
140
  _: 1
141
141
  }, 8, ["duration", "type"])) : D("", !0),
142
142
  w($, {
143
143
  duration: n.store.animationDuration.value,
144
- type: n.store.maskAnimation.value
144
+ type: n.store.viewAnimation.value
145
145
  }, {
146
- default: I(() => [
147
- w(te)
146
+ default: S(() => [
147
+ w(ne)
148
148
  ]),
149
149
  _: 1
150
150
  }, 8, ["duration", "type"])
151
151
  ], 64));
152
152
  }
153
- }), ne = (n, {
153
+ }), oe = (n, {
154
154
  component: e,
155
155
  componentProps: o,
156
156
  onMounted: t,
157
157
  onUnmounted: i,
158
158
  appendTo: s,
159
159
  mask: u,
160
- maskClickCloseEnabled: h,
160
+ maskClickClose: h,
161
161
  disableScroll: _,
162
- ...T
162
+ ...x
163
163
  }) => ({
164
164
  id: n,
165
- parentElement: oe(s),
165
+ parentElement: ie(s),
166
166
  appendTo: s,
167
167
  mask: u,
168
- maskClickCloseEnabled: h,
168
+ maskClickClose: h,
169
169
  disableScroll: _,
170
170
  component: e,
171
171
  componentProps: o,
172
172
  onMounted: t,
173
173
  onUnmounted: i,
174
174
  isBeforeUnmount: m(!1),
175
- ...J(q(T))
175
+ ...q(K(x))
176
176
  });
177
- function oe(n) {
177
+ function ie(n) {
178
178
  return typeof n == "string" && (n = document.querySelector(n) || document.body), n;
179
179
  }
180
- class ie {
180
+ class se {
181
181
  #t;
182
182
  get seed() {
183
183
  return this.#t;
@@ -189,7 +189,7 @@ class ie {
189
189
  this.#t = e;
190
190
  }
191
191
  }
192
- class se {
192
+ class ae {
193
193
  #t;
194
194
  #i;
195
195
  #e;
@@ -199,17 +199,20 @@ class se {
199
199
  get id() {
200
200
  return this.#i;
201
201
  }
202
+ get store() {
203
+ return this.#e;
204
+ }
202
205
  get renderType() {
203
206
  return this.#t.config.debugMode ? "app" : "vnode";
204
207
  }
205
208
  constructor(e, o) {
206
- this.#t = e, this.#i = new ie(e.seed), this.#e = ne(this.#i, o), this.renderType === "app" ? (this.#n = G(x, { store: this.#e }), this.#n._context.components = this.#t.app._context.components, this.#n._context.provides = this.#t.app._context.provides, this.#n._context.config = this.#t.app._context.config, this.#n._context.directives = this.#t.app._context.directives, this.#n._context.mixins = this.#t.app._context.mixins) : (this.#s = w(x, { store: this.#e }), this.#s.appContext = this.#t.app._context, this.#s.appContext.components.Popup = x);
209
+ this.#t = e, this.#i = new se(e.seed), this.#e = oe(this.#i, o), this.renderType === "app" ? (this.#n = J(C, { store: this.#e }), this.#n._context.components = this.#t.app._context.components, this.#n._context.provides = this.#t.app._context.provides, this.#n._context.config = this.#t.app._context.config, this.#n._context.directives = this.#t.app._context.directives, this.#n._context.mixins = this.#t.app._context.mixins) : (this.#s = w(C, { store: this.#e }), this.#s.appContext = this.#t.app._context, this.#s.appContext.components.Popup = C);
207
210
  }
208
211
  mount() {
209
212
  return this.#o = document.createElement("div"), this.renderType === "app" ? this.#n.mount(this.#o) : O(this.#s, this.#o), this.#e.parentElement.appendChild(this.#o), this.#e.onMounted(), this.id;
210
213
  }
211
214
  async unmount(e) {
212
- this.#e.isBeforeUnmount.value = !0, await K(this.#e.animationDuration.value), this.renderType === "app" ? this.#n.unmount() : (O(null, this.#o), this.#e.parentElement.removeChild(this.#o)), this.#e.onUnmounted(e);
215
+ this.#e.isBeforeUnmount.value = !0, await Q(this.#e.animationDuration.value), this.renderType === "app" ? this.#n.unmount() : (O(null, this.#o), this.#e.parentElement.removeChild(this.#o)), this.#e.onUnmounted(e);
213
216
  }
214
217
  update(e) {
215
218
  for (const o in e) {
@@ -226,7 +229,7 @@ class f extends Error {
226
229
  return `vue-popup-plus error: ${this.message}`;
227
230
  }
228
231
  }
229
- class ae {
232
+ class re {
230
233
  NONE = "none";
231
234
  FADE = "fade";
232
235
  SCALE_ENLARGE = "scale-enlarge";
@@ -238,18 +241,18 @@ class ae {
238
241
  constructor() {
239
242
  }
240
243
  }
241
- const l = new ae(), we = (n) => n, re = (n) => new Proxy(
244
+ const l = new re(), ge = (n) => n, ue = (n) => new Proxy(
242
245
  n,
243
246
  {
244
247
  set(e, o, t) {
245
248
  throw new f(`${o} 是只读属性,不能被覆盖`);
246
249
  },
247
250
  get(e, o) {
248
- return o === "customProperties" ? ue(n) : o === "customAnimations" ? ce() : n[o];
251
+ return o === "customProperties" ? ce(n) : o === "customAnimations" ? le() : n[o];
249
252
  }
250
253
  }
251
254
  );
252
- function ue(n) {
255
+ function ce(n) {
253
256
  return new Proxy(
254
257
  {},
255
258
  {
@@ -267,7 +270,7 @@ function ue(n) {
267
270
  }
268
271
  );
269
272
  }
270
- function ce(n) {
273
+ function le(n) {
271
274
  return new Proxy(
272
275
  {},
273
276
  {
@@ -285,10 +288,10 @@ function ce(n) {
285
288
  }
286
289
  );
287
290
  }
288
- const le = {
291
+ const pe = {
289
292
  appendTo: document.body,
290
293
  mask: !0,
291
- maskClickCloseEnabled: !1,
294
+ maskClickClose: !1,
292
295
  disableScroll: !0,
293
296
  componentProps: {},
294
297
  onMounted: () => {
@@ -304,11 +307,12 @@ const le = {
304
307
  viewTranslateX: 0,
305
308
  viewTranslateY: 0,
306
309
  viewTranslateOverflow: !1,
307
- animationDuration: 100,
310
+ viewAnimation: l.FADE,
308
311
  maskAnimation: l.FADE,
309
- viewAnimation: l.FADE
312
+ maskBlur: !0,
313
+ animationDuration: 100
310
314
  };
311
- class pe {
315
+ class de {
312
316
  _core;
313
317
  constructor(e) {
314
318
  this._core = e;
@@ -321,12 +325,12 @@ class pe {
321
325
  throw new f(
322
326
  `使用插件 ${e.name} 失败,已存在同名插件 ${e.name}`
323
327
  );
324
- e.install(re(this), this._core.config);
328
+ e.install(ue(this), this._core.config);
325
329
  }
326
330
  render({ zIndex: e, ...o }) {
327
331
  e = e ?? this._core.config.zIndex++;
328
- const t = new se(this._core, {
329
- ...le,
332
+ const t = new ae(this._core, {
333
+ ...pe,
330
334
  ...o,
331
335
  zIndex: e
332
336
  });
@@ -343,12 +347,12 @@ class pe {
343
347
  }
344
348
  let Y = null;
345
349
  function he(n) {
346
- return new me(n);
350
+ return new ve(n);
347
351
  }
348
- function de() {
352
+ function me() {
349
353
  return Y;
350
354
  }
351
- class me {
355
+ class ve {
352
356
  app;
353
357
  #t = 1;
354
358
  #i = {};
@@ -371,16 +375,18 @@ class me {
371
375
  autoDisableScroll: t = !0,
372
376
  debugMode: i = !1
373
377
  } = {}) {
374
- this.#n = { zIndex: e, prototypeName: o, autoDisableScroll: t, debugMode: i }, this.#e = new pe(this), Y = this;
378
+ this.#n = { zIndex: e, prototypeName: o, autoDisableScroll: t, debugMode: i }, this.#e = new de(this), Y = this;
375
379
  }
376
380
  addInstance(e) {
377
- this.#i[e.id.name] = e, this.#a();
381
+ this.#i[e.id.name] = e, this.config.autoDisableScroll && e.store.disableScroll && this.#a();
378
382
  }
379
383
  getInstance(e) {
380
384
  return this.#i[e.name];
381
385
  }
382
386
  removeInstance(e) {
383
- delete this.#i[e.id.name], Object.keys(this.#i).length === 0 && this.#r();
387
+ delete this.#i[e.id.name], Object.values(this.#i).filter(
388
+ (o) => o.store.disableScroll
389
+ ).length === 0 && this.#r();
384
390
  }
385
391
  addPlugin(e) {
386
392
  return this.getPlugin(e.name) ? !1 : (this.#s[e.name] = e, !0);
@@ -392,18 +398,18 @@ class me {
392
398
  delete this.#s[e];
393
399
  }
394
400
  #a() {
395
- this.config.autoDisableScroll && document.body.style.overflow !== "hidden" && (this.#o = document.body.style.overflow, document.body.style.overflow = "hidden");
401
+ document.body.style.overflow !== "hidden" && (this.#o = document.body.style.overflow, document.body.style.overflow = "hidden");
396
402
  }
397
403
  #r() {
398
404
  this.config.autoDisableScroll && (document.body.style.overflow = this.#o);
399
405
  }
400
406
  }
401
- const ge = "1.2.1";
402
- function ye(n) {
407
+ const ye = "1.3.2";
408
+ function Pe(n) {
403
409
  return he(n).controller;
404
410
  }
405
- function ve() {
406
- const n = de();
411
+ function fe() {
412
+ const n = me();
407
413
  if (!n)
408
414
  throw new f(
409
415
  "调用 usePopup 前请先调用 createPopup 创建弹出层插件实例"
@@ -413,8 +419,8 @@ function ve() {
413
419
  export {
414
420
  l as POPUP_ANIMATIONS,
415
421
  y as POPUP_COMPONENT_INJECTS,
416
- ye as createPopup,
417
- we as definePlugin,
418
- ve as usePopup,
419
- ge as version
422
+ Pe as createPopup,
423
+ ge as definePlugin,
424
+ fe as usePopup,
425
+ ye as version
420
426
  };
@@ -1,2 +1,2 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".vue-popup-plus-animation-enter-fade[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-fade-90654c9b}.vue-popup-plus-animation-leave-fade[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-fade-90654c9b}.vue-popup-plus-animation-enter-scale-enlarge[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-scale-enlarge-90654c9b}.vue-popup-plus-animation-leave-scale-enlarge[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-scale-enlarge-90654c9b}.vue-popup-plus-animation-enter-scale-shrink[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-scale-shrink-90654c9b}.vue-popup-plus-animation-leave-scale-shrink[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-scale-shrink-90654c9b}.vue-popup-plus-animation-enter-fly-top[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-fly-top-90654c9b}.vue-popup-plus-animation-leave-fly-top[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-fly-top-90654c9b}.vue-popup-plus-animation-enter-fly-left[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-fly-left-90654c9b}.vue-popup-plus-animation-leave-fly-left[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-fly-left-90654c9b}.vue-popup-plus-animation-enter-fly-right[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-fly-right-90654c9b}.vue-popup-plus-animation-leave-fly-right[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-fly-right-90654c9b}.vue-popup-plus-animation-enter-fly-bottom[data-v-90654c9b]{animation-name:vue-popup-plus-animation-enter-fly-bottom-90654c9b}.vue-popup-plus-animation-leave-fly-bottom[data-v-90654c9b]{animation-name:vue-popup-plus-animation-leave-fly-bottom-90654c9b}@-moz-keyframes vue-popup-plus-animation-enter-fade-90654c9b{0%{opacity:0}to{opacity:1}}@-webkit-keyframes vue-popup-plus-animation-enter-fade-90654c9b{0%{opacity:0}to{opacity:1}}@-o-keyframes vue-popup-plus-animation-enter-fade-90654c9b{0%{opacity:0}to{opacity:1}}@keyframes vue-popup-plus-animation-enter-fade-90654c9b{0%{opacity:0}to{opacity:1}}@-moz-keyframes vue-popup-plus-animation-leave-fade-90654c9b{0%{opacity:1}to{opacity:0}}@-webkit-keyframes vue-popup-plus-animation-leave-fade-90654c9b{0%{opacity:1}to{opacity:0}}@-o-keyframes vue-popup-plus-animation-leave-fade-90654c9b{0%{opacity:1}to{opacity:0}}@keyframes vue-popup-plus-animation-leave-fade-90654c9b{0%{opacity:1}to{opacity:0}}@-moz-keyframes vue-popup-plus-animation-enter-scale-enlarge-90654c9b{0%{transform:scale(0)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-enlarge-90654c9b{0%{transform:scale(0)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-enlarge-90654c9b{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-enlarge-90654c9b{0%{transform:scale(0)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-enlarge-90654c9b{0%{transform:scale(1)}to{transform:scale(0)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-enlarge-90654c9b{0%{transform:scale(1)}to{transform:scale(0)}}@-o-keyframes vue-popup-plus-animation-leave-scale-enlarge-90654c9b{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes vue-popup-plus-animation-leave-scale-enlarge-90654c9b{0%{transform:scale(1)}to{transform:scale(0)}}@-moz-keyframes vue-popup-plus-animation-enter-scale-shrink-90654c9b{0%{transform:scale(5)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-shrink-90654c9b{0%{transform:scale(5)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-shrink-90654c9b{0%{transform:scale(5)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-shrink-90654c9b{0%{transform:scale(5)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-shrink-90654c9b{0%{transform:scale(1)}to{transform:scale(5)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-shrink-90654c9b{0%{transform:scale(1)}to{transform:scale(5)}}@-o-keyframes vue-popup-plus-animation-leave-scale-shrink-90654c9b{0%{transform:scale(1)}to{transform:scale(5)}}@keyframes vue-popup-plus-animation-leave-scale-shrink-90654c9b{0%{transform:scale(1)}to{transform:scale(5)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-top-90654c9b{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-top-90654c9b{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-top-90654c9b{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-top-90654c9b{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-top-90654c9b{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-top-90654c9b{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-top-90654c9b{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@keyframes vue-popup-plus-animation-leave-fly-top-90654c9b{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-left-90654c9b{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-left-90654c9b{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-left-90654c9b{0%{transform:translate(-100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-left-90654c9b{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-left-90654c9b{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-left-90654c9b{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-left-90654c9b{0%{transform:translate(0)}to{transform:translate(-100vw)}}@keyframes vue-popup-plus-animation-leave-fly-left-90654c9b{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-right-90654c9b{0%{transform:translate(100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-right-90654c9b{0%{transform:translate(100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-right-90654c9b{0%{transform:translate(100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-right-90654c9b{0%{transform:translate(100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-right-90654c9b{0%{transform:translate(0)}to{transform:translate(100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-right-90654c9b{0%{transform:translate(0)}to{transform:translate(100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-right-90654c9b{0%{transform:translate(0)}to{transform:translate(100vw)}}@keyframes vue-popup-plus-animation-leave-fly-right-90654c9b{0%{transform:translate(0)}to{transform:translate(100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-bottom-90654c9b{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-bottom-90654c9b{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-bottom-90654c9b{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-bottom-90654c9b{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-bottom-90654c9b{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-bottom-90654c9b{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-bottom-90654c9b{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@keyframes vue-popup-plus-animation-leave-fly-bottom-90654c9b{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.popup-mask[data-v-90654c9b]{position:fixed;inset:0;background-color:#0000004d}.vue-popup-plus-animation-enter-fade[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-fade-ef218a67}.vue-popup-plus-animation-leave-fade[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-fade-ef218a67}.vue-popup-plus-animation-enter-scale-enlarge[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-scale-enlarge-ef218a67}.vue-popup-plus-animation-leave-scale-enlarge[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-scale-enlarge-ef218a67}.vue-popup-plus-animation-enter-scale-shrink[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-scale-shrink-ef218a67}.vue-popup-plus-animation-leave-scale-shrink[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-scale-shrink-ef218a67}.vue-popup-plus-animation-enter-fly-top[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-fly-top-ef218a67}.vue-popup-plus-animation-leave-fly-top[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-fly-top-ef218a67}.vue-popup-plus-animation-enter-fly-left[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-fly-left-ef218a67}.vue-popup-plus-animation-leave-fly-left[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-fly-left-ef218a67}.vue-popup-plus-animation-enter-fly-right[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-fly-right-ef218a67}.vue-popup-plus-animation-leave-fly-right[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-fly-right-ef218a67}.vue-popup-plus-animation-enter-fly-bottom[data-v-ef218a67]{animation-name:vue-popup-plus-animation-enter-fly-bottom-ef218a67}.vue-popup-plus-animation-leave-fly-bottom[data-v-ef218a67]{animation-name:vue-popup-plus-animation-leave-fly-bottom-ef218a67}@-moz-keyframes vue-popup-plus-animation-enter-fade-ef218a67{0%{opacity:0}to{opacity:1}}@-webkit-keyframes vue-popup-plus-animation-enter-fade-ef218a67{0%{opacity:0}to{opacity:1}}@-o-keyframes vue-popup-plus-animation-enter-fade-ef218a67{0%{opacity:0}to{opacity:1}}@keyframes vue-popup-plus-animation-enter-fade-ef218a67{0%{opacity:0}to{opacity:1}}@-moz-keyframes vue-popup-plus-animation-leave-fade-ef218a67{0%{opacity:1}to{opacity:0}}@-webkit-keyframes vue-popup-plus-animation-leave-fade-ef218a67{0%{opacity:1}to{opacity:0}}@-o-keyframes vue-popup-plus-animation-leave-fade-ef218a67{0%{opacity:1}to{opacity:0}}@keyframes vue-popup-plus-animation-leave-fade-ef218a67{0%{opacity:1}to{opacity:0}}@-moz-keyframes vue-popup-plus-animation-enter-scale-enlarge-ef218a67{0%{transform:scale(0)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-enlarge-ef218a67{0%{transform:scale(0)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-enlarge-ef218a67{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-enlarge-ef218a67{0%{transform:scale(0)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-enlarge-ef218a67{0%{transform:scale(1)}to{transform:scale(0)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-enlarge-ef218a67{0%{transform:scale(1)}to{transform:scale(0)}}@-o-keyframes vue-popup-plus-animation-leave-scale-enlarge-ef218a67{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes vue-popup-plus-animation-leave-scale-enlarge-ef218a67{0%{transform:scale(1)}to{transform:scale(0)}}@-moz-keyframes vue-popup-plus-animation-enter-scale-shrink-ef218a67{0%{transform:scale(5)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-shrink-ef218a67{0%{transform:scale(5)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-shrink-ef218a67{0%{transform:scale(5)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-shrink-ef218a67{0%{transform:scale(5)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-shrink-ef218a67{0%{transform:scale(1)}to{transform:scale(5)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-shrink-ef218a67{0%{transform:scale(1)}to{transform:scale(5)}}@-o-keyframes vue-popup-plus-animation-leave-scale-shrink-ef218a67{0%{transform:scale(1)}to{transform:scale(5)}}@keyframes vue-popup-plus-animation-leave-scale-shrink-ef218a67{0%{transform:scale(1)}to{transform:scale(5)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-top-ef218a67{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-top-ef218a67{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-top-ef218a67{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-top-ef218a67{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-top-ef218a67{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-top-ef218a67{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-top-ef218a67{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@keyframes vue-popup-plus-animation-leave-fly-top-ef218a67{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-left-ef218a67{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-left-ef218a67{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-left-ef218a67{0%{transform:translate(-100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-left-ef218a67{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-left-ef218a67{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-left-ef218a67{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-left-ef218a67{0%{transform:translate(0)}to{transform:translate(-100vw)}}@keyframes vue-popup-plus-animation-leave-fly-left-ef218a67{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-right-ef218a67{0%{transform:translate(100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-right-ef218a67{0%{transform:translate(100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-right-ef218a67{0%{transform:translate(100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-right-ef218a67{0%{transform:translate(100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-right-ef218a67{0%{transform:translate(0)}to{transform:translate(100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-right-ef218a67{0%{transform:translate(0)}to{transform:translate(100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-right-ef218a67{0%{transform:translate(0)}to{transform:translate(100vw)}}@keyframes vue-popup-plus-animation-leave-fly-right-ef218a67{0%{transform:translate(0)}to{transform:translate(100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-bottom-ef218a67{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-bottom-ef218a67{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-bottom-ef218a67{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-bottom-ef218a67{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-bottom-ef218a67{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-bottom-ef218a67{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-bottom-ef218a67{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@keyframes vue-popup-plus-animation-leave-fly-bottom-ef218a67{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.popup-view-wrapper[data-v-ef218a67]{position:fixed;inset:0;display:flex;justify-content:center;align-items:center;pointer-events:none}.popup-view-wrapper .popup-view[data-v-ef218a67]{position:relative;margin:auto;pointer-events:auto}.vue-popup-plus-animation{animation-timing-function:linear;animation-duration:var(--v9a56ef92)}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- (function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.VuePopupPlus={},s.Vue))})(this,(function(s,e){"use strict";const w="vue-popup-plus",p={INSTANCE_ID:Symbol(`${w}-instance-id`),COMPUTED_VIEW_STYLE:Symbol(`${w}-computed-view-style`)},f={INSTANCE_STORE:Symbol(`${w}-instance-store`)};function S(o){return new Promise(t=>{setTimeout(t,o)})}const N=e.defineComponent({name:"PopupMask",__name:"PopupMask",setup(o){const t=e.inject(p.INSTANCE_ID),i=e.inject(f.INSTANCE_STORE);function n(){i.maskClickCloseEnabled&&T().destroy(t)}return(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:"popup-mask",style:e.normalizeStyle({zIndex:e.unref(i).zIndex.value}),onClick:n},null,4))}}),y=(o,t)=>{const i=o.__vccOpts||o;for(const[n,a]of t)i[n]=a;return i},I=y(N,[["__scopeId","data-v-90654c9b"]]),x=y(e.defineComponent({name:"PopupView",__name:"PopupView",setup(o){const t=e.ref(),i=e.inject(p.INSTANCE_ID),n=e.inject(f.INSTANCE_STORE),a=e.ref(0),r=e.ref(0),u=e.computed(()=>typeof n.component=="function"?e.defineAsyncComponent(n.component):n.component),h=e.computed(()=>n.viewTranslateOverflow.value?n.viewTranslateX.value:n.viewTranslateX.value>0?Math.min(n.viewTranslateX.value,(window.innerWidth-a.value)/2):Math.max(n.viewTranslateX.value,-(window.innerWidth-a.value)/2)),_=e.computed(()=>n.viewTranslateOverflow.value?n.viewTranslateY.value:n.viewTranslateY.value>0?Math.min(n.viewTranslateY.value,(window.innerHeight-r.value)/2):Math.max(n.viewTranslateY.value,-(window.innerHeight-r.value)/2)),P=e.computed(()=>({width:d(n.width.value),maxWidth:d(n.maxWidth.value),minWidth:d(n.minWidth.value),height:d(n.height.value),maxHeight:d(n.maxHeight.value),minHeight:d(n.minHeight.value),transform:`translate(${h.value}px, ${_.value}px)`})),z=e.computed(()=>({width:a.value,height:r.value,zIndex:n.zIndex.value,translateX:h.value,translateY:_.value}));e.provide(p.COMPUTED_VIEW_STYLE,z),e.onMounted(()=>{window.setTimeout(E,n.animationDuration.value)}),e.onUpdated(()=>{E()});async function E(){await e.nextTick();const c=t.value?.getBoundingClientRect();c&&(a.value=c.width,r.value=c.height)}function d(c){return typeof c=="number"?`${c}px`:c}return(c,X)=>(e.openBlock(),e.createElementBlock("div",{class:"popup-view-wrapper",style:e.normalizeStyle({zIndex:e.unref(n).zIndex.value})},[e.createElementVNode("div",{class:"popup-view",style:e.normalizeStyle(P.value),ref_key:"popupViewRef",ref:t},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),e.mergeProps({key:`${e.unref(i).name}-component`},e.unref(n).componentProps),null,16))],4)],4))}}),[["__scopeId","data-v-ef218a67"]]),v=e.defineComponent({name:"PopupAnimation",__name:"PopupAnimation",props:{type:{},duration:{}},setup(o){e.useCssVars(u=>({v9a56ef92:r.value}));const t=e.inject(f.INSTANCE_STORE),i=e.ref(!1),n=e.computed(()=>`vue-popup-plus-animation vue-popup-plus-animation-enter-${o.type}`),a=e.computed(()=>`vue-popup-plus-animation vue-popup-plus-animation-leave-${o.type}`),r=e.computed(()=>`${o.duration}ms`);return e.onMounted(()=>{i.value=!0}),(u,h)=>(e.openBlock(),e.createBlock(e.Transition,{"enter-active-class":n.value,"leave-active-class":a.value},{default:e.withCtx(()=>[i.value&&!e.unref(t).isBeforeUnmount.value?e.renderSlot(u.$slots,"default",{key:0,style:e.normalizeStyle({animationDuration:`${o.duration}ms`})}):e.createCommentVNode("",!0)]),_:3},8,["enter-active-class","leave-active-class"]))}}),g=e.defineComponent({name:"Popup",__name:"Popup",props:{store:{}},setup(o){return e.provide(p.INSTANCE_ID,o.store.id),e.provide(f.INSTANCE_STORE,o.store),(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.store.mask?(e.openBlock(),e.createBlock(v,{key:0,duration:o.store.animationDuration.value,type:o.store.maskAnimation.value},{default:e.withCtx(()=>[e.createVNode(I)]),_:1},8,["duration","type"])):e.createCommentVNode("",!0),e.createVNode(v,{duration:o.store.animationDuration.value,type:o.store.maskAnimation.value},{default:e.withCtx(()=>[e.createVNode(x)]),_:1},8,["duration","type"])],64))}}),k=(o,{component:t,componentProps:i,onMounted:n,onUnmounted:a,appendTo:r,mask:u,maskClickCloseEnabled:h,disableScroll:_,...P})=>({id:o,parentElement:A(r),appendTo:r,mask:u,maskClickCloseEnabled:h,disableScroll:_,component:t,componentProps:i,onMounted:n,onUnmounted:a,isBeforeUnmount:e.ref(!1),...e.toRefs(e.reactive(P))});function A(o){return typeof o=="string"&&(o=document.querySelector(o)||document.body),o}class O{#t;get seed(){return this.#t}get name(){return`vue-popup-plus-instance-${this.seed}`}constructor(t){this.#t=t}}class ${#t;#i;#e;#n;#a;#o;get id(){return this.#i}get renderType(){return this.#t.config.debugMode?"app":"vnode"}constructor(t,i){this.#t=t,this.#i=new O(t.seed),this.#e=k(this.#i,i),this.renderType==="app"?(this.#n=e.createApp(g,{store:this.#e}),this.#n._context.components=this.#t.app._context.components,this.#n._context.provides=this.#t.app._context.provides,this.#n._context.config=this.#t.app._context.config,this.#n._context.directives=this.#t.app._context.directives,this.#n._context.mixins=this.#t.app._context.mixins):(this.#a=e.createVNode(g,{store:this.#e}),this.#a.appContext=this.#t.app._context,this.#a.appContext.components.Popup=g)}mount(){return this.#o=document.createElement("div"),this.renderType==="app"?this.#n.mount(this.#o):e.render(this.#a,this.#o),this.#e.parentElement.appendChild(this.#o),this.#e.onMounted(),this.id}async unmount(t){this.#e.isBeforeUnmount.value=!0,await S(this.#e.animationDuration.value),this.renderType==="app"?this.#n.unmount():(e.render(null,this.#o),this.#e.parentElement.removeChild(this.#o)),this.#e.onUnmounted(t)}update(t){for(const i in t){const n=i,a=t[n]===void 0?this.#e[n].value:t[n];this.#e[n].value=a}}}class m extends Error{constructor(t){super(t)}toString(){return`vue-popup-plus error: ${this.message}`}}class b{NONE="none";FADE="fade";SCALE_ENLARGE="scale-enlarge";SCALE_SHRINK="scale-shrink";FLY_TOP="fly-top";FLY_LEFT="fly-left";FLY_RIGHT="fly-right";FLY_BOTTOM="fly-bottom";constructor(){}}const l=new b,M=o=>o,D=o=>new Proxy(o,{set(t,i,n){throw new m(`${i} 是只读属性,不能被覆盖`)},get(t,i){return i==="customProperties"?B(o):i==="customAnimations"?V():o[i]}});function B(o){return new Proxy({},{set:(t,i,n)=>{if(i in o)throw new m(`定义插件扩展属性 ${i} 时失败,${i} 是只读属性,不能被覆盖`);return o.__proto__[i]=n,!0},get:(t,i)=>{if(i in o)return o.__proto__[i]}})}function V(o){return new Proxy({},{set:(t,i,n)=>{if(i in l)throw new m(`定义插件扩展动画类型 ${i} 时失败,${i} 是只读属性,不能被覆盖`);return l.__proto__[i]=n,!0},get:(t,i)=>{if(i in l)return l.__proto__[i]}})}const U={appendTo:document.body,mask:!0,maskClickCloseEnabled:!1,disableScroll:!0,componentProps:{},onMounted:()=>{},onUnmounted:()=>{},width:"auto",maxWidth:"auto",minWidth:"auto",height:"auto",maxHeight:"auto",minHeight:"auto",viewTranslateX:0,viewTranslateY:0,viewTranslateOverflow:!1,animationDuration:100,maskAnimation:l.FADE,viewAnimation:l.FADE};class Y{_core;constructor(t){this._core=t}install(t){t.config.globalProperties[this._core.config.prototypeName]=this,this._core.app=t}use(t){if(!this._core.addPlugin(t))throw new m(`使用插件 ${t.name} 失败,已存在同名插件 ${t.name}`);t.install(D(this),this._core.config)}render({zIndex:t,...i}){t=t??this._core.config.zIndex++;const n=new $(this._core,{...U,...i,zIndex:t});return this._core.addInstance(n),n.mount(),n.id}update(t,i){const n=this._core.getInstance(t);n&&n.update(i)}async destroy(t,i){const n=this._core.getInstance(t);n&&(await n.unmount(i),this._core.removeInstance(n))}}let C=null;function R(o){return new H(o)}function W(){return C}class H{app;#t=1;#i={};#e;#n;#a={};#o="";get seed(){return this.#t++}get config(){return this.#n}get controller(){return this.#e}constructor({zIndex:t=1e3,prototypeName:i="$popup",autoDisableScroll:n=!0,debugMode:a=!1}={}){this.#n={zIndex:t,prototypeName:i,autoDisableScroll:n,debugMode:a},this.#e=new Y(this),C=this}addInstance(t){this.#i[t.id.name]=t,this.#s()}getInstance(t){return this.#i[t.name]}removeInstance(t){delete this.#i[t.id.name],Object.keys(this.#i).length===0&&this.#r()}addPlugin(t){return this.getPlugin(t.name)?!1:(this.#a[t.name]=t,!0)}getPlugin(t){return this.#a[t]}removePlugin(t){delete this.#a[t]}#s(){this.config.autoDisableScroll&&document.body.style.overflow!=="hidden"&&(this.#o=document.body.style.overflow,document.body.style.overflow="hidden")}#r(){this.config.autoDisableScroll&&(document.body.style.overflow=this.#o)}}const L="1.2.1";function j(o){return R(o).controller}function T(){const o=W();if(!o)throw new m("调用 usePopup 前请先调用 createPopup 创建弹出层插件实例");return o.controller}s.POPUP_ANIMATIONS=l,s.POPUP_COMPONENT_INJECTS=p,s.createPopup=j,s.definePlugin=M,s.usePopup=T,s.version=L,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".popup-mask[data-v-53a2b502]{position:fixed;inset:0;background-color:var(--popup-color-mask)}.popup-mask.is-blur[data-v-53a2b502]{-webkit-backdrop-filter:blur(15px) saturate(180%);backdrop-filter:blur(15px) saturate(180%)}.popup-view-wrapper[data-v-13c586d7]{position:fixed;inset:0;display:flex;justify-content:center;align-items:center;pointer-events:none}.popup-view-wrapper .popup-view[data-v-13c586d7]{position:relative;margin:auto;pointer-events:auto}.vue-popup-plus-animation{animation-timing-function:linear;animation-duration:var(--v9a56ef92)}.vue-popup-plus-animation-enter-fade{animation-name:vue-popup-plus-animation-enter-fade}.vue-popup-plus-animation-leave-fade{animation-name:vue-popup-plus-animation-leave-fade}.vue-popup-plus-animation-enter-scale-enlarge{animation-name:vue-popup-plus-animation-enter-scale-enlarge}.vue-popup-plus-animation-leave-scale-enlarge{animation-name:vue-popup-plus-animation-leave-scale-enlarge}.vue-popup-plus-animation-enter-scale-shrink{animation-name:vue-popup-plus-animation-enter-scale-shrink}.vue-popup-plus-animation-leave-scale-shrink{animation-name:vue-popup-plus-animation-leave-scale-shrink}.vue-popup-plus-animation-enter-fly-top{animation-name:vue-popup-plus-animation-enter-fly-top}.vue-popup-plus-animation-leave-fly-top{animation-name:vue-popup-plus-animation-leave-fly-top}.vue-popup-plus-animation-enter-fly-left{animation-name:vue-popup-plus-animation-enter-fly-left}.vue-popup-plus-animation-leave-fly-left{animation-name:vue-popup-plus-animation-leave-fly-left}.vue-popup-plus-animation-enter-fly-right{animation-name:vue-popup-plus-animation-enter-fly-right}.vue-popup-plus-animation-leave-fly-right{animation-name:vue-popup-plus-animation-leave-fly-right}.vue-popup-plus-animation-enter-fly-bottom{animation-name:vue-popup-plus-animation-enter-fly-bottom}.vue-popup-plus-animation-leave-fly-bottom{animation-name:vue-popup-plus-animation-leave-fly-bottom}@-moz-keyframes vue-popup-plus-animation-enter-fade{0%{opacity:0}to{opacity:1}}@-webkit-keyframes vue-popup-plus-animation-enter-fade{0%{opacity:0}to{opacity:1}}@-o-keyframes vue-popup-plus-animation-enter-fade{0%{opacity:0}to{opacity:1}}@keyframes vue-popup-plus-animation-enter-fade{0%{opacity:0}to{opacity:1}}@-moz-keyframes vue-popup-plus-animation-leave-fade{0%{opacity:1}to{opacity:0}}@-webkit-keyframes vue-popup-plus-animation-leave-fade{0%{opacity:1}to{opacity:0}}@-o-keyframes vue-popup-plus-animation-leave-fade{0%{opacity:1}to{opacity:0}}@keyframes vue-popup-plus-animation-leave-fade{0%{opacity:1}to{opacity:0}}@-moz-keyframes vue-popup-plus-animation-enter-scale-enlarge{0%{transform:scale(0)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-enlarge{0%{transform:scale(0)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-enlarge{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-enlarge{0%{transform:scale(0)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-enlarge{0%{transform:scale(1)}to{transform:scale(0)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-enlarge{0%{transform:scale(1)}to{transform:scale(0)}}@-o-keyframes vue-popup-plus-animation-leave-scale-enlarge{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes vue-popup-plus-animation-leave-scale-enlarge{0%{transform:scale(1)}to{transform:scale(0)}}@-moz-keyframes vue-popup-plus-animation-enter-scale-shrink{0%{transform:scale(5)}to{transform:scale(1)}}@-webkit-keyframes vue-popup-plus-animation-enter-scale-shrink{0%{transform:scale(5)}to{transform:scale(1)}}@-o-keyframes vue-popup-plus-animation-enter-scale-shrink{0%{transform:scale(5)}to{transform:scale(1)}}@keyframes vue-popup-plus-animation-enter-scale-shrink{0%{transform:scale(5)}to{transform:scale(1)}}@-moz-keyframes vue-popup-plus-animation-leave-scale-shrink{0%{transform:scale(1)}to{transform:scale(5)}}@-webkit-keyframes vue-popup-plus-animation-leave-scale-shrink{0%{transform:scale(1)}to{transform:scale(5)}}@-o-keyframes vue-popup-plus-animation-leave-scale-shrink{0%{transform:scale(1)}to{transform:scale(5)}}@keyframes vue-popup-plus-animation-leave-scale-shrink{0%{transform:scale(1)}to{transform:scale(5)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-top{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-top{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-top{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-top{0%{transform:translateY(-100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-top{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-top{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-top{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@keyframes vue-popup-plus-animation-leave-fly-top{0%{transform:translateY(0)}to{transform:translateY(-100vh)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-left{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-left{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-left{0%{transform:translate(-100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-left{0%{transform:translate(-100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-left{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-left{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-left{0%{transform:translate(0)}to{transform:translate(-100vw)}}@keyframes vue-popup-plus-animation-leave-fly-left{0%{transform:translate(0)}to{transform:translate(-100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-right{0%{transform:translate(100vw)}to{transform:translate(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-right{0%{transform:translate(100vw)}to{transform:translate(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-right{0%{transform:translate(100vw)}to{transform:translate(0)}}@keyframes vue-popup-plus-animation-enter-fly-right{0%{transform:translate(100vw)}to{transform:translate(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-right{0%{transform:translate(0)}to{transform:translate(100vw)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-right{0%{transform:translate(0)}to{transform:translate(100vw)}}@-o-keyframes vue-popup-plus-animation-leave-fly-right{0%{transform:translate(0)}to{transform:translate(100vw)}}@keyframes vue-popup-plus-animation-leave-fly-right{0%{transform:translate(0)}to{transform:translate(100vw)}}@-moz-keyframes vue-popup-plus-animation-enter-fly-bottom{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-webkit-keyframes vue-popup-plus-animation-enter-fly-bottom{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-o-keyframes vue-popup-plus-animation-enter-fly-bottom{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes vue-popup-plus-animation-enter-fly-bottom{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@-moz-keyframes vue-popup-plus-animation-leave-fly-bottom{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-webkit-keyframes vue-popup-plus-animation-leave-fly-bottom{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@-o-keyframes vue-popup-plus-animation-leave-fly-bottom{0%{transform:translateY(0)}to{transform:translateY(100vh)}}@keyframes vue-popup-plus-animation-leave-fly-bottom{0%{transform:translateY(0)}to{transform:translateY(100vh)}}:root{--popup-color-mask: rgba(175,175,175,.3);--popup-color-mask-dark-lite: rgba(158,158,158,.3);--popup-color-mask-dark: rgba(131,131,131,.3);--popup-color-mask-dark-most: rgba(70,70,70,.3);--popup-color-mask-light-lite: rgba(183,183,183,.3);--popup-color-mask-light: rgba(195,195,195,.3);--popup-color-mask-light-most: rgba(223,223,223,.3)}.dark{--popup-color-mask: rgba(75,75,75,.3);--popup-color-mask-dark-lite: rgba(68,68,68,.3);--popup-color-mask-dark: rgba(56,56,56,.3);--popup-color-mask-dark-most: rgba(30,30,30,.3);--popup-color-mask-light-lite: rgba(93,93,93,.3);--popup-color-mask-light: rgba(120,120,120,.3);--popup-color-mask-light-most: rgba(183,183,183,.3)}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ (function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.VuePopupPlus={},r.Vue))})(this,(function(r,e){"use strict";const w="vue-popup-plus",p={INSTANCE_ID:Symbol(`${w}-instance-id`),COMPUTED_VIEW_STYLE:Symbol(`${w}-computed-view-style`)},f={INSTANCE_STORE:Symbol(`${w}-instance-store`)};function E(o=0){return new Promise(t=>{window.setTimeout(t,o)})}const N=e.defineComponent({name:"PopupMask",__name:"PopupMask",setup(o){const t=e.inject(p.INSTANCE_ID),i=e.inject(f.INSTANCE_STORE);function n(){i.maskClickClose&&T().destroy(t)}return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["popup-mask",{"is-blur":e.unref(i).maskBlur.value}]),style:e.normalizeStyle({zIndex:e.unref(i).zIndex.value}),onClick:n},null,6))}}),v=(o,t)=>{const i=o.__vccOpts||o;for(const[n,s]of t)i[n]=s;return i},I=v(N,[["__scopeId","data-v-53a2b502"]]),x=v(e.defineComponent({name:"PopupView",__name:"PopupView",setup(o){const t=e.ref(),i=e.inject(p.INSTANCE_ID),n=e.inject(f.INSTANCE_STORE),s=e.ref(0),a=e.ref(0),u=e.computed(()=>typeof n.component=="function"?e.defineAsyncComponent(n.component):n.component),h=e.computed(()=>n.viewTranslateOverflow.value?n.viewTranslateX.value:n.viewTranslateX.value>0?Math.min(n.viewTranslateX.value,(window.innerWidth-s.value)/2):Math.max(n.viewTranslateX.value,-(window.innerWidth-s.value)/2)),_=e.computed(()=>n.viewTranslateOverflow.value?n.viewTranslateY.value:n.viewTranslateY.value>0?Math.min(n.viewTranslateY.value,(window.innerHeight-a.value)/2):Math.max(n.viewTranslateY.value,-(window.innerHeight-a.value)/2)),P=e.computed(()=>({width:d(n.width.value),maxWidth:d(n.maxWidth.value),minWidth:d(n.minWidth.value),height:d(n.height.value),maxHeight:d(n.maxHeight.value),minHeight:d(n.minHeight.value),transform:`translate(${h.value}px, ${_.value}px)`})),j=e.computed(()=>({width:s.value,height:a.value,zIndex:n.zIndex.value,translateX:h.value,translateY:_.value}));e.provide(p.COMPUTED_VIEW_STYLE,j),e.onMounted(()=>{window.setTimeout(S,n.animationDuration.value)}),e.onUpdated(()=>{S()});async function S(){await e.nextTick();const c=t.value?.getBoundingClientRect();c&&(s.value=c.width,a.value=c.height)}function d(c){return typeof c=="number"?`${c}px`:c}return(c,X)=>(e.openBlock(),e.createElementBlock("div",{class:"popup-view-wrapper",style:e.normalizeStyle({zIndex:e.unref(n).zIndex.value})},[e.createElementVNode("div",{class:"popup-view",style:e.normalizeStyle(P.value),ref_key:"popupViewRef",ref:t},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),e.mergeProps({key:`${e.unref(i).name}-component`},e.unref(n).componentProps),null,16))],4)],4))}}),[["__scopeId","data-v-13c586d7"]]),y=e.defineComponent({name:"PopupAnimation",__name:"PopupAnimation",props:{type:{},duration:{}},setup(o){e.useCssVars(u=>({v9a56ef92:a.value}));const t=e.inject(f.INSTANCE_STORE),i=e.ref(!1),n=e.computed(()=>`vue-popup-plus-animation vue-popup-plus-animation-enter-${o.type}`),s=e.computed(()=>`vue-popup-plus-animation vue-popup-plus-animation-leave-${o.type}`),a=e.computed(()=>`${o.duration}ms`);return e.onMounted(()=>{i.value=!0}),(u,h)=>(e.openBlock(),e.createBlock(e.Transition,{"enter-active-class":n.value,"leave-active-class":s.value},{default:e.withCtx(()=>[i.value&&!e.unref(t).isBeforeUnmount.value?e.renderSlot(u.$slots,"default",{key:0,style:e.normalizeStyle({animationDuration:`${o.duration}ms`})}):e.createCommentVNode("",!0)]),_:3},8,["enter-active-class","leave-active-class"]))}}),g=e.defineComponent({name:"Popup",__name:"Popup",props:{store:{}},setup(o){return e.provide(p.INSTANCE_ID,o.store.id),e.provide(f.INSTANCE_STORE,o.store),(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.store.mask?(e.openBlock(),e.createBlock(y,{key:0,duration:o.store.animationDuration.value,type:o.store.maskAnimation.value},{default:e.withCtx(()=>[e.createVNode(I)]),_:1},8,["duration","type"])):e.createCommentVNode("",!0),e.createVNode(y,{duration:o.store.animationDuration.value,type:o.store.viewAnimation.value},{default:e.withCtx(()=>[e.createVNode(x)]),_:1},8,["duration","type"])],64))}}),k=(o,{component:t,componentProps:i,onMounted:n,onUnmounted:s,appendTo:a,mask:u,maskClickClose:h,disableScroll:_,...P})=>({id:o,parentElement:A(a),appendTo:a,mask:u,maskClickClose:h,disableScroll:_,component:t,componentProps:i,onMounted:n,onUnmounted:s,isBeforeUnmount:e.ref(!1),...e.toRefs(e.reactive(P))});function A(o){return typeof o=="string"&&(o=document.querySelector(o)||document.body),o}class O{#t;get seed(){return this.#t}get name(){return`vue-popup-plus-instance-${this.seed}`}constructor(t){this.#t=t}}class b{#t;#i;#e;#n;#s;#o;get id(){return this.#i}get store(){return this.#e}get renderType(){return this.#t.config.debugMode?"app":"vnode"}constructor(t,i){this.#t=t,this.#i=new O(t.seed),this.#e=k(this.#i,i),this.renderType==="app"?(this.#n=e.createApp(g,{store:this.#e}),this.#n._context.components=this.#t.app._context.components,this.#n._context.provides=this.#t.app._context.provides,this.#n._context.config=this.#t.app._context.config,this.#n._context.directives=this.#t.app._context.directives,this.#n._context.mixins=this.#t.app._context.mixins):(this.#s=e.createVNode(g,{store:this.#e}),this.#s.appContext=this.#t.app._context,this.#s.appContext.components.Popup=g)}mount(){return this.#o=document.createElement("div"),this.renderType==="app"?this.#n.mount(this.#o):e.render(this.#s,this.#o),this.#e.parentElement.appendChild(this.#o),this.#e.onMounted(),this.id}async unmount(t){this.#e.isBeforeUnmount.value=!0,await E(this.#e.animationDuration.value),this.renderType==="app"?this.#n.unmount():(e.render(null,this.#o),this.#e.parentElement.removeChild(this.#o)),this.#e.onUnmounted(t)}update(t){for(const i in t){const n=i,s=t[n]===void 0?this.#e[n].value:t[n];this.#e[n].value=s}}}class m extends Error{constructor(t){super(t)}toString(){return`vue-popup-plus error: ${this.message}`}}class ${NONE="none";FADE="fade";SCALE_ENLARGE="scale-enlarge";SCALE_SHRINK="scale-shrink";FLY_TOP="fly-top";FLY_LEFT="fly-left";FLY_RIGHT="fly-right";FLY_BOTTOM="fly-bottom";constructor(){}}const l=new $,M=o=>o,B=o=>new Proxy(o,{set(t,i,n){throw new m(`${i} 是只读属性,不能被覆盖`)},get(t,i){return i==="customProperties"?D(o):i==="customAnimations"?V():o[i]}});function D(o){return new Proxy({},{set:(t,i,n)=>{if(i in o)throw new m(`定义插件扩展属性 ${i} 时失败,${i} 是只读属性,不能被覆盖`);return o.__proto__[i]=n,!0},get:(t,i)=>{if(i in o)return o.__proto__[i]}})}function V(o){return new Proxy({},{set:(t,i,n)=>{if(i in l)throw new m(`定义插件扩展动画类型 ${i} 时失败,${i} 是只读属性,不能被覆盖`);return l.__proto__[i]=n,!0},get:(t,i)=>{if(i in l)return l.__proto__[i]}})}const U={appendTo:document.body,mask:!0,maskClickClose:!1,disableScroll:!0,componentProps:{},onMounted:()=>{},onUnmounted:()=>{},width:"auto",maxWidth:"auto",minWidth:"auto",height:"auto",maxHeight:"auto",minHeight:"auto",viewTranslateX:0,viewTranslateY:0,viewTranslateOverflow:!1,viewAnimation:l.FADE,maskAnimation:l.FADE,maskBlur:!0,animationDuration:100};class Y{_core;constructor(t){this._core=t}install(t){t.config.globalProperties[this._core.config.prototypeName]=this,this._core.app=t}use(t){if(!this._core.addPlugin(t))throw new m(`使用插件 ${t.name} 失败,已存在同名插件 ${t.name}`);t.install(B(this),this._core.config)}render({zIndex:t,...i}){t=t??this._core.config.zIndex++;const n=new b(this._core,{...U,...i,zIndex:t});return this._core.addInstance(n),n.mount(),n.id}update(t,i){const n=this._core.getInstance(t);n&&n.update(i)}async destroy(t,i){const n=this._core.getInstance(t);n&&(await n.unmount(i),this._core.removeInstance(n))}}let C=null;function R(o){return new H(o)}function W(){return C}class H{app;#t=1;#i={};#e;#n;#s={};#o="";get seed(){return this.#t++}get config(){return this.#n}get controller(){return this.#e}constructor({zIndex:t=1e3,prototypeName:i="$popup",autoDisableScroll:n=!0,debugMode:s=!1}={}){this.#n={zIndex:t,prototypeName:i,autoDisableScroll:n,debugMode:s},this.#e=new Y(this),C=this}addInstance(t){this.#i[t.id.name]=t,this.config.autoDisableScroll&&t.store.disableScroll&&this.#r()}getInstance(t){return this.#i[t.name]}removeInstance(t){delete this.#i[t.id.name],Object.values(this.#i).filter(i=>i.store.disableScroll).length===0&&this.#a()}addPlugin(t){return this.getPlugin(t.name)?!1:(this.#s[t.name]=t,!0)}getPlugin(t){return this.#s[t]}removePlugin(t){delete this.#s[t]}#r(){document.body.style.overflow!=="hidden"&&(this.#o=document.body.style.overflow,document.body.style.overflow="hidden")}#a(){this.config.autoDisableScroll&&(document.body.style.overflow=this.#o)}}const z="1.3.2";function L(o){return R(o).controller}function T(){const o=W();if(!o)throw new m("调用 usePopup 前请先调用 createPopup 创建弹出层插件实例");return o.controller}r.POPUP_ANIMATIONS=l,r.POPUP_COMPONENT_INJECTS=p,r.createPopup=L,r.definePlugin=M,r.usePopup=T,r.version=z,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-popup-plus",
3
- "version": "1.2.1",
3
+ "version": "1.3.2",
4
4
  "keywords": [
5
5
  "vue",
6
6
  "vue3",