|
|
import{H as t,J as e,V as o,X as s,O as i,K as a,L as n,o as r,c as l,w as u,R as d,k as c,P as p,m,i as h,N as y,b as f,aK as v,M as b,d as g,ao as k}from"./index-IX2tYR8R.js";import{_ as S}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{r as _}from"./uni-app.es.Bc5t55A8.js";import{_ as w}from"./u-status-bar.weuqoXTS.js";import{_ as I}from"./u-icon.sW6sruaF.js";const $=t({props:{show:{type:Boolean,default:()=>e.transition.show},mode:{type:String,default:()=>e.transition.mode},duration:{type:[String,Number],default:()=>e.transition.duration},timingFunction:{type:String,default:()=>e.transition.timingFunction}}}),C=t=>({enter:`u-${t}-enter u-${t}-enter-active`,"enter-to":`u-${t}-enter-to u-${t}-enter-active`,leave:`u-${t}-leave u-${t}-leave-active`,"leave-to":`u-${t}-leave-to u-${t}-leave-active`});const x=S({name:"u-transition",data:()=>({inited:!1,viewStyle:{},status:"",transitionEnded:!1,display:!1,classes:""}),emits:["click","beforeEnter","enter","afterEnter","beforeLeave","leave","afterLeave"],computed:{mergeStyle(){const{viewStyle:t,customStyle:e}=this;return{transitionDuration:`${this.duration}ms`,transitionTimingFunction:this.timingFunction,...i(e),...t}}},mixins:[a,n,{methods:{clickHandler(){this.$emit("click")},async vueEnter(){const t=C(this.mode);this.status="enter",this.$emit("beforeEnter"),this.inited=!0,this.display=!0,this.classes=t.enter,await o(),await s(20),this.$emit("enter"),this.transitionEnded=!1,this.$emit("afterEnter"),this.classes=t["enter-to"]},async vueLeave(){if(!this.display)return;const t=C(this.mode);this.status="leave",this.$emit("beforeLeave"),this.classes=t.leave,await o(),this.transitionEnded=!1,this.$emit("leave"),setTimeout(this.onTransitionEnd,this.duration),this.classes=t["leave-to"]},onTransitionEnd(){this.transitionEnded||(this.transitionEnded=!0,this.$emit("leave"===this.status?"afterLeave":"afterEnter"),!this.show&&this.display&&(this.display=!1,this.inited=!1))}}},$],watch:{show:{handler(t){t?this.vueEnter():this.vueLeave()},immediate:!0}}},[["render",function(t,e,o,s,i,a){const n=h;return i.inited?(r(),l(n,{key:0,class:c(["u-transition",i.classes]),ref:"u-transition",onClick:t.clickHandler,style:p([a.mergeStyle]),onTouchmove:t.noop},{default:u((()=>[d(t.$slots,"default",{},void 0,!0)])),_:3},8,["onClick","class","style","onTouchmove"])):m("",!0)}],["__scopeId","data-v-dd73690f"]]);const E=S({name:"u-overlay",mixins:[a,n,t({props:{show:{type:Boolean,default:()=>e.overlay.show},zIndex:{type:[String,Number],default:()=>e.overlay.zIndex},duration:{type:[String,Number],default:()=>e.overlay.duration},opacity:{type:[String,Number],default:()=>e.overlay.opacity}}})],computed:{overlayStyle(){const t={position:"fixed",top:0,left:0,right:0,zIndex:this.zIndex,bottom:0,"background-color":`rgba(0, 0, 0, ${this.opacity})`};return y(t,i(this.customStyle))}},emits:["click"],methods:{clickHandler(){this.$emit("click")}}},[["render",function(t,e,o,s,i,a){const n=_(f("u-transition"),x);return r(),l(n,{show:t.show,"custom-class":"u-overlay",duration:t.duration,"custom-style":a.overlayStyle,onClick:a.clickHandler},{default:u((()=>[d(t.$slots,"default",{},void 0,!0)])),_:3},8,["show","duration","custom-style","onClick"])}],["__scopeId","data-v-ff00b8e0"]]);const z=S({name:"u-safe-bottom",mixins:[a,n,t({props:{}})],data:()=>({safeAreaBottomHeight:0,isNvue:!1}),computed:{style(){return y({},i(this.customStyle))}},mounted(){}},[["render",function(t,e,o,s,i,a){const n=h;return r(),l(n,{class:c(["u-safe-bottom",[!i.isNvue&&"u-safe-area-inset-bottom"]]),style:p([a.style])},null,8,["style","class"])}],["__scopeId","data-v-15f70745"]]);const B=S({name:"u-popup",mixins:[a,n,t({props:{show:{type:Boolean,default:()=>e.popup.show},overlay:{type:Boolean,default:()=>e.popup.overlay},mode:{type:String,default:()=>e.popup.mode},duration:{type:[String,Number],default:()=>e.popup.duration},closeable:{type:Boolean,default:()=>e.popup.closeable},overlayStyle:{type:[Object,String],default:()=>e.popup.overlayStyle},closeOnClickOverlay:{type:Boolean,default:()=>e.popup.closeOnClickOverlay},zIndex:{type:[String,Numb
|