1 |
- import{_ as ct,__tla as mt}from"./ComponentContainerProperty-05f4c99c.js";import{ez as ft,eA as dt,eB as ht,d as K,aQ as yt,eC as vt,r as V,o as b,c as D,f as o,w as y,y as U,g as N,F as C,v as S,a as m,ao as tt,t as gt,l as wt,j as xt,G as et,_ as at,C as kt,H as Ht,__tla as Vt}from"./index-8dc1e40a.js";import{_ as bt,__tla as Dt}from"./UploadImg-c2c75279.js";import{E as zt,__tla as Et}from"./el-text-13e93c25.js";import{u as Tt,__tla as Ut}from"./util-6f9e53a1.js";import{_ as Ct,__tla as It}from"./AppLinkSelectDialog-4ba8225c.js";import{_ as Xt,__tla as Pt}from"./Dialog-41802231.js";import{E as Lt,__tla as Ft}from"./el-image-6a48e9f1.js";import{__tla as Mt}from"./el-image-viewer-3b8905e6.js";import{__tla as Ot}from"./el-card-18df90f0.js";import{__tla as Rt}from"./index-0f4b3d5e.js";import"./color-6e929987.js";import{__tla as Wt}from"./index-519182c1.js";import{__tla as Zt}from"./useMessage-7a27dd80.js";import{__tla as $t}from"./Qrcode-b0c88a5f.js";import{__tla as jt}from"./IFrame-e28a12d4.js";import{__tla as At}from"./vuedraggable.umd-3e3e7da3.js";import{__tla as Gt}from"./el-collapse-item-7e888ef0.js";import{__tla as Yt}from"./ProductCategorySelect-94eeee28.js";import{__tla as qt}from"./el-tree-select-d82790d8.js";import"./tree-0af4953a.js";import{__tla as Bt}from"./category-e7433506.js";let lt,Qt=Promise.all([(()=>{try{return mt}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return Ut}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Pt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Zt}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||_!==z){var z=_;ft(_)?ot.call(i,_,1):dt(i,_)}}}(e,l),v}const T=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 W,I,Z,$,j,A;W=[{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%)"}}],I=(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}},Z=["onMousedown","onDblclick"],$={class:"pointer-events-none select-none"},j=["onMousedown"],A=at(K({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:T,height:T,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>=T&&a.left+t<=i.value.offsetWidth&&(a.width=t)},z=(a,t)=>{t>=T&&a.top+t<=i.value.offsetHeight&&(a.height=t)},X=()=>{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=Xt,it=Ct;return b(),D(C,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:X,type:"primary",plain:""},{default:y(()=>[o(L,{icon:"ep:check",class:"mr-5px"}),U(" \u786E\u5B9A ")]),_:1})]),default:y(()=>[N("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(C,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,F)=>{I(u,F,(k,E,q,B,M,O)=>{p(u,k+M),g(u,E+O)})})(c,H),onDblclick:H=>{return u=c,h.value=u,void G.value.open(u.url);var u}},[N("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(C,null,S(m(W),(H,u)=>(b(),D("span",{class:"ctrl-dot",key:u,style:tt(H.style),onMousedown:F=>((k,E,q)=>{I(k,q,(B,M,O,ut,Q,J)=>{E.types.forEach(_t=>{switch(_t){case w.LEFT:p(k,B+Q);break;case w.TOP:g(k,M+J);break;case w.WIDTH:{const R=E.types.includes(w.LEFT)?-1:1;_(k,O+Q*R)}break;case w.HEIGHT:{const R=E.types.includes(w.TOP)?-1:1;z(k,ut+J*R)}}})})})(c,H,F)},null,44,j))),128))],44,Z))),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(K({name:"HotZoneProperty",__name:"property",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(e,{emit:f}){const v=e,d=f,{formData:l}=Tt(v.modelValue,d),s=V(),n=()=>{s.value.open()};return(i,r)=>{const p=zt,g=bt,_=kt,z=Ht,X=et,P=ct;return b(),D(C,null,[o(P,{modelValue:m(l).style,"onUpdate:modelValue":r[1]||(r[1]=h=>m(l).style=h)},{default:y(()=>[o(z,{"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(X,{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{Qt as __tla,lt as default};
|