"use strict";const t=require("../../common/vendor.js"),r={props:{title:{type:String,default:""},fontweight:{type:[String,Number],default:"normal"},visible:{type:Boolean,default:!1},maxHeight:{type:[String,Number],default:"75%"},radius:{type:[String,Number],default:"0"},animaTime:{type:Number,default:.2},bottom:{type:[String,Number],default:0},bgColor:{type:[String],default:"#ffffff"},zindex:{type:[String,Number],default:1e3},maskZindex:{type:[String,Number],default:999},always:{type:Boolean,default:!1}},data(){return{show:!1,height:0,PopHeight:0,cotMaxHeight:"",isAnimaStart:!1,rpxRate:"",cotRadius:0}},watch:{visible(e){this.isAnimaStart=!0,setTimeout(()=>{this.isAnimaStart=!1},this.animaTime*1e3),e&&this.height===0?(this.PopHeight===0||this.always?this.setContViewHeight():this.height=this.PopHeight,this.$emit("open")):this.height=0,this.show=e},maxHeight:{handler(e){this.cotMaxHeight=this.unitCheck(e)},immediate:!0},radius:{handler(e){this.cotRadius=this.unitCheck(e)},immediate:!0}},created(){this.rpxRate=this.getRpxRate()},mounted(){this.$nextTick(()=>{})},methods:{onClose(){this.$emit("update:visible",!1),this.$emit("close")},onScrollToLower(e){this.$emit("reachBottom")},getRpxRate(){return 750/t.index.getWindowInfo().windowWidth},unitCheck(e){const o=String(e);return!o.includes("px")&&!o.includes("%")?`${o}rpx`:o},preventTouch(e){e.addEventListener("touchmove",function(o){o.stopPropagation()},{passive:!1})},setBodyOverFlow(e){document.body.style.overflow=e},async setContViewHeight(){let e=await this.computeHeight();this.height=e.height+(this.title?100/parseFloat(this.rpxRate):0),this.PopHeight=this.height},computeHeight(){return new Promise(e=>{this.$nextTick(()=>{t.index.createSelectorQuery().in(this).select("#popup_content").boundingClientRect(i=>{e(i)}).exec()})})}}};function a(e,o,i,u,s,n){return{a:i.maskZindex,b:i.bottom+"rpx",c:s.show,d:t.o((...h)=>n.onClose&&n.onClose(...h)),e:t.o(()=>{}),f:t.t(i.title),g:i.fontweight,h:t.o((...h)=>n.onClose&&n.onClose(...h)),i:i.title,j:s.isAnimaStart?1:"",k:t.o((...h)=>n.onScrollToLower&&n.onScrollToLower(...h)),l:t.n({show:s.show}),m:t.o(()=>{}),n:t.o(()=>{}),o:i.bgColor,p:`${s.height}px`,q:s.show?s.cotMaxHeight:0,r:s.cotRadius,s:s.cotRadius,t:`all ${i.animaTime}s ease-in`,v:i.bottom+"rpx",w:i.zindex,x:t.n({"popup-show":s.show}),y:t.o(()=>{}),z:t.o(()=>{}),A:i.zindex}}const l=t._export_sfc(r,[["render",a],["__scopeId","data-v-4fac7f82"]]);wx.createComponent(l); //# sourceMappingURL=../../../.sourcemap/mp-weixin/components/px-popup-bottom/px-popup-bottom.js.map