property-76f19a42.js 7.5 KB

1
  1. import{_ as ct,__tla as mt}from"./ComponentContainerProperty-b2a93226.js";import{ey as ft,ez as dt,eA as ht,d as N,aT as yt,eB as vt,r as V,o as b,c as D,i as o,w as y,j as U,g as Q,F as I,k as S,a as m,ar as tt,t as gt,y as wt,v as xt,J as et,_ as at,H as kt,K as Ht,__tla as Vt}from"./index-afaf388d.js";import{_ as bt,__tla as Dt}from"./UploadImg-f909692d.js";import{E as Tt,__tla as zt}from"./el-text-7e1fd337.js";import{u as Et,__tla as Ut}from"./util-dabf19a0.js";import{_ as It,__tla as Xt}from"./AppLinkSelectDialog-80aeba3d.js";import{_ as Ct,__tla as Pt}from"./Dialog-82c2009c.js";import{E as Lt,__tla as Ot}from"./el-image-caa301d0.js";import{__tla as Wt}from"./el-image-viewer-9330e340.js";import{__tla as Ft}from"./el-card-9c18d881.js";import{__tla as Zt}from"./index-5a680306.js";import"./color-6e929987.js";import{__tla as Mt}from"./index-6149057d.js";import{__tla as Rt}from"./useMessage-a290df31.js";import{__tla as $t}from"./Qrcode-fd7de4a4.js";import{__tla as jt}from"./IFrame-fbb7dcab.js";import{__tla as At}from"./vuedraggable.umd-10ed286b.js";import{__tla as Gt}from"./el-collapse-item-2a135d3a.js";import{__tla as Yt}from"./ProductCategorySelect-fc853cb8.js";import{__tla as qt}from"./el-tree-select-190eecb6.js";import"./tree-0af4953a.js";import{__tla as Bt}from"./category-f4ef186a.js";let lt,Jt=Promise.all([(()=>{try{return mt}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return Ut}catch{}})(),(()=>{try{return Xt}catch{}})(),(()=>{try{return Pt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return Yt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return Bt}catch{}})()]).then(async()=>{var ot=Array.prototype.splice;function rt(e,f){var v=[];if(!e||!e.length)return v;var d=-1,l=[],s=e.length;for(f=ht(f);++d<s;){var n=e[d];f(n,d,e)&&(v.push(n),l.push(d))}return function(i,r){for(var p=i?r.length:0,g=p-1;p--;){var _=r[p];if(p==g||_!==T){var T=_;ft(_)?ot.call(i,_,1):dt(i,_)}}}(e,l),v}const E=100;var w=(e=>(e[e.LEFT=0]="LEFT",e[e.TOP=1]="TOP",e[e.WIDTH=2]="WIDTH",e[e.HEIGHT=3]="HEIGHT",e))(w||{});let M,X,R,$,j,A;M=[{position:"\u5DE6\u4E0A\u89D2",types:[0,1,2,3],style:{left:"-5px",top:"-5px",cursor:"nwse-resize"}},{position:"\u4E0A\u65B9\u4E2D\u95F4",types:[1,3],style:{left:"50%",top:"-5px",cursor:"n-resize",transform:"translateX(-50%)"}},{position:"\u53F3\u4E0A\u89D2",types:[1,2,3],style:{right:"-5px",top:"-5px",cursor:"nesw-resize"}},{position:"\u53F3\u4FA7\u4E2D\u95F4",types:[2],style:{right:"-5px",top:"50%",cursor:"e-resize",transform:"translateX(-50%)"}},{position:"\u53F3\u4E0B\u89D2",types:[2,3],style:{right:"-5px",bottom:"-5px",cursor:"nwse-resize"}},{position:"\u4E0B\u65B9\u4E2D\u95F4",types:[3],style:{left:"50%",bottom:"-5px",cursor:"s-resize",transform:"translateX(-50%)"}},{position:"\u5DE6\u4E0B\u89D2",types:[0,2,3],style:{left:"-5px",bottom:"-5px",cursor:"nesw-resize"}},{position:"\u5DE6\u4FA7\u4E2D\u95F4",types:[0,2],style:{left:"-5px",top:"50%",cursor:"w-resize",transform:"translateX(-50%)"}}],X=(e,f,v)=>{f.stopPropagation();const{clientX:d,clientY:l}=f,{left:s,top:n,width:i,height:r}=e;document.onmousemove=p=>{const g=p.clientX-d,_=p.clientY-l;v(s,n,i,r,g,_)},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}},R=["onMousedown","onDblclick"],$={class:"pointer-events-none select-none"},j=["onMousedown"],A=at(N({name:"HotZoneEditDialog",__name:"index",props:{modelValue:yt(),imgUrl:vt().def("")},emits:["update:modelValue"],setup(e,{expose:f,emit:v}){const d=e,l=v,s=V([]),n=V(!1);f({open:()=>{var a;s.value=(a=d.modelValue,(a==null?void 0:a.map(t=>({...t,left:t.left*=2,top:t.top*=2,width:t.width*=2,height:t.height*=2})))||[]),n.value=!0}});const i=V(),r=()=>{s.value.push({width:E,height:E,top:0,left:0})},p=(a,t)=>{t>=0&&t<=i.value.offsetWidth-a.width&&(a.left=t)},g=(a,t)=>{t>=0&&t<=i.value.offsetHeight-a.height&&(a.top=t)},_=(a,t)=>{t>=E&&a.left+t<=i.value.offsetWidth&&(a.width=t)},T=(a,t)=>{t>=E&&a.top+t<=i.value.offsetHeight&&(a.height=t)},C=()=>{n.value=!1},P=()=>{const a=(t=>(t==null?void 0:t.map(x=>({...x,left:x.left/=2,top:x.top/=2,width:x.width/=2,height:x.height/=2})))||[])(s.value);l("update:modelValue",a)},h=V(),G=V(),st=a=>{a&&h.value&&(h.value.name=a.name,h.value.url=a.path)};return(a,t)=>{const x=Lt,L=xt,Y=et,nt=Ct,it=It;return b(),D(I,null,[o(nt,{modelValue:m(n),"onUpdate:modelValue":t[0]||(t[0]=c=>wt(n)?n.value=c:null),title:"\u8BBE\u7F6E\u70ED\u533A",width:"780",onClose:P},{footer:y(()=>[o(Y,{onClick:r,type:"primary",plain:""},{default:y(()=>[o(L,{icon:"ep:plus",class:"mr-5px"}),U(" \u6DFB\u52A0\u70ED\u533A ")]),_:1}),o(Y,{onClick:C,type:"primary",plain:""},{default:y(()=>[o(L,{icon:"ep:check",class:"mr-5px"}),U(" \u786E\u5B9A ")]),_:1})]),default:y(()=>[Q("div",{ref_key:"container",ref:i,class:"relative h-full w-750px"},[o(x,{src:e.imgUrl,class:"pointer-events-none h-full w-750px select-none"},null,8,["src"]),(b(!0),D(I,null,S(m(s),(c,pt)=>(b(),D("div",{key:pt,class:"hot-zone",style:tt({width:`${c.width}px`,height:`${c.height}px`,top:`${c.top}px`,left:`${c.left}px`}),onMousedown:H=>((u,O)=>{X(u,O,(k,z,q,B,W,F)=>{p(u,k+W),g(u,z+F)})})(c,H),onDblclick:H=>{return u=c,h.value=u,void G.value.open(u.url);var u}},[Q("span",$,gt(c.name||"\u53CC\u51FB\u9009\u62E9\u94FE\u63A5"),1),o(L,{icon:"ep:close",class:"delete",size:14,onClick:H=>{return u=c,void rt(s.value,u);var u}},null,8,["onClick"]),(b(!0),D(I,null,S(m(M),(H,u)=>(b(),D("span",{class:"ctrl-dot",key:u,style:tt(H.style),onMousedown:O=>((k,z,q)=>{X(k,q,(B,W,F,ut,J,K)=>{z.types.forEach(_t=>{switch(_t){case w.LEFT:p(k,B+J);break;case w.TOP:g(k,W+K);break;case w.WIDTH:{const Z=z.types.includes(w.LEFT)?-1:1;_(k,F+J*Z)}break;case w.HEIGHT:{const Z=z.types.includes(w.TOP)?-1:1;T(k,ut+K*Z)}}})})})(c,H,O)},null,44,j))),128))],44,R))),128))],512)]),_:1},8,["modelValue"]),o(it,{ref_key:"appLinkDialogRef",ref:G,onAppLinkChange:st},null,512)],64)}}}),[["__scopeId","data-v-e60b1a26"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/components/DiyEditor/components/mobile/HotZone/components/HotZoneEditDialog/index.vue"]]),lt=at(N({name:"HotZoneProperty",__name:"property",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(e,{emit:f}){const v=e,d=f,{formData:l}=Et(v.modelValue,d),s=V(),n=()=>{s.value.open()};return(i,r)=>{const p=Tt,g=bt,_=kt,T=Ht,C=et,P=ct;return b(),D(I,null,[o(P,{modelValue:m(l).style,"onUpdate:modelValue":r[1]||(r[1]=h=>m(l).style=h)},{default:y(()=>[o(T,{"label-width":"80px",model:m(l),class:"m-t-8px"},{default:y(()=>[o(_,{label:"\u4E0A\u4F20\u56FE\u7247",prop:"imgUrl"},{default:y(()=>[o(g,{modelValue:m(l).imgUrl,"onUpdate:modelValue":r[0]||(r[0]=h=>m(l).imgUrl=h),height:"50px",width:"auto",class:"min-w-80px"},{tip:y(()=>[o(p,{type:"info",size:"small"},{default:y(()=>[U(" \u63A8\u8350\u5BBD\u5EA6 750")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"]),o(C,{type:"primary",plain:"",class:"w-full",onClick:n},{default:y(()=>[U(" \u8BBE\u7F6E\u70ED\u533A ")]),_:1})]),_:1},8,["modelValue"]),o(A,{ref_key:"editDialogRef",ref:s,modelValue:m(l).list,"onUpdate:modelValue":r[2]||(r[2]=h=>m(l).list=h),"img-url":m(l).imgUrl},null,8,["modelValue","img-url"])],64)}}}),[["__scopeId","data-v-1dfabffd"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/components/DiyEditor/components/mobile/HotZone/property.vue"]])});export{Jt as __tla,lt as default};