2 lines
951 B
JavaScript
2 lines
951 B
JavaScript
import{_ as t,ah as e,M as i,S as a,o as h,c as n,w as s,a6 as r,i as d}from"./index-CS85kPhe.js";let m;const o=t({name:"UniMatchMedia",props:{width:{type:[Number,String],default:""},minWidth:{type:[Number,String],default:""},maxWidth:{type:[Number,String],default:""},height:{type:[Number,String],default:""},minHeight:{type:[Number,String],default:""},maxHeight:{type:[Number,String],default:""},orientation:{type:String,default:""}},data:()=>({matches:!0}),mounted(){let t=this.$parent;for(;t.$parent;)t=t.$parent;m=e(t),m.observe({width:this.width,maxWidth:this.maxWidth,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight,maxHeight:this.maxHeight,orientation:this.orientation},(t=>{this.matches=t}))},destroyed(){m.disconnect()}},[["render",function(t,e,m,o,u,g){const p=d;return i((h(),n(p,null,{default:s((()=>[r(t.$slots,"default",{},void 0,!0)])),_:3},512)),[[a,u.matches]])}],["__scopeId","data-v-a87c69c7"]]);export{o as _};
|