var o,t;import{_ as e}from"./uv-transition.b971e856.js";import{Y as s,Z as a,G as r,H as i,o as n,j as l,w as u,a0 as d,Q as c}from"./index-9bec188e.js";import{_ as m}from"./_plugin-vue_export-helper.1b428a4d.js";const p=m({name:"uv-overlay",emits:["click"],mixins:[s,a,{props:{show:{type:Boolean,default:!1},zIndex:{type:[String,Number],default:10070},duration:{type:[String,Number],default:300},opacity:{type:[String,Number],default:.5},...null==(t=null==(o=uni.$uv)?void 0:o.props)?void 0:t.overlay}}],watch:{show(o){document.querySelector("body").style.overflow=o?"hidden":""}},computed:{overlayStyle(){const o={position:"fixed",top:0,left:0,right:0,zIndex:this.zIndex,bottom:0,"background-color":`rgba(0, 0, 0, ${this.opacity})`};return this.$uv.deepMerge(o,this.$uv.addStyle(this.customStyle))}},methods:{clickHandler(){this.$emit("click")},clear(){}}},[["render",function(o,t,s,a,m,p){const v=r(i("uv-transition"),e);return n(),l(v,{show:o.show,mode:"fade","custom-class":"uv-overlay",duration:o.duration,"custom-style":p.overlayStyle,onClick:p.clickHandler,onTouchmove:c(p.clear,["stop","prevent"])},{default:u((()=>[d(o.$slots,"default",{},void 0,!0)])),_:3},8,["show","duration","custom-style","onClick","onTouchmove"])}],["__scopeId","data-v-0c47b2a6"]]);export{p as _};
