import{_ as e,o,f as t,w as s,h as n,n as i,v as l,i as a,ar as c,d as u,e as d,a2 as r,k as h,S as y,V as m,T as p,j as f,t as S,l as g}from"./index-DDTNXLuk.js";import{_ as v}from"./uni-icons.C2Znp22s.js";const w=e({data:()=>({}),props:{size:{type:Number,default:100},mask:{type:Boolean,default:!0}},computed:{icontStyle(){return`font-size:${this.size}rpx`},loadingStyle(){return this.mask?"background: rgba(0, 0, 0, 0.3);":""}}},[["render",function(e,c,u,d,r,h){const y=a;return o(),t(y,{class:"loading-box",style:i(h.loadingStyle)},{default:s((()=>[n(y,{class:"rotate iconfont icon-loading",style:i(h.icontStyle)},null,8,["style"]),l(e.$slots,"default",{},void 0,!0)])),_:3},8,["style"])}],["__scopeId","data-v-4ced41d3"]]);const T=e({name:"pop-menu",data:()=>({isShowMenu:!1,isTouchMove:!1,style:""}),props:{items:{type:Array},index:{type:Number}},methods:{onLongPress(e){this.isTouchMove||c({success:o=>{let t=e.touches[0],s="";console.log(`获取设备信息：触摸点：--${JSON.stringify(e)}  设备信息：--${JSON.stringify(o)}`),s=t.clientY>o.windowHeight/2?`bottom:${o.windowHeight-t.clientY}px;`:`top:${t.clientY}px;`,t.clientX>o.windowWidth/2?s+=`right:${o.windowWidth-t.clientX}px;`:s+=`left:${t.clientX}px;`,this.menuStyle=s,this.$nextTick((()=>{this.isShowMenu=!0}))}})},onTouchMove(){this.onClose(),this.isTouchMove=!0},onTouchEnd(){this.isTouchMove=!1},onSelectMenu(e){this.$emit("select",e),this.isShowMenu=!1},onClose(){this.isShowMenu=!1},itemStyle:e=>e.color?`color:${e.color};`:"color:#4f76e6;"}},[["render",function(e,c,w,T,M,_){const $=a,k=u(d("uni-icons"),v),x=g;return o(),t($,null,{default:s((()=>[n($,{onLongpress:c[0]||(c[0]=r((e=>_.onLongPress(e)),["stop"])),onTouchmove:_.onTouchMove,onTouchend:_.onTouchEnd},{default:s((()=>[l(e.$slots,"default",{},void 0,!0)])),_:3},8,["onTouchmove","onTouchend"]),M.isShowMenu?(o(),t($,{key:0,class:"pop-menu",onTouchstart:c[1]||(c[1]=e=>_.onClose()),onContextmenu:c[2]||(c[2]=r((()=>{}),["prevent"]))})):h("",!0),M.isShowMenu?(o(),t($,{key:1,class:"menu",style:i(e.menuStyle)},{default:s((()=>[(o(!0),y(m,null,p(w.items,(e=>(o(),t($,{class:"menu-item",key:e.key,onClick:r((o=>_.onSelectMenu(e)),["prevent"])},{default:s((()=>[n(k,{class:"menu-icon",type:e.icon,style:i(_.itemStyle(e)),size:"22"},null,8,["type","style"]),n(x,{style:i(_.itemStyle(e))},{default:s((()=>[f(S(e.name),1)])),_:2},1032,["style"])])),_:2},1032,["onClick"])))),128))])),_:1},8,["style"])):h("",!0)])),_:3})}],["__scopeId","data-v-93ada9f3"]]);export{w as _,T as a};
