1 |
- import{_ as ct,__tla as mt}from"./ComponentContainerProperty-6b80cef6.js";import{eA as dt,eB as ft,eC as ht,d as K,dQ as yt,eD as vt,r as T,o as H,c as z,i as r,w as y,m as D,k as N,F as C,C as S,a as m,ax as tt,t as gt,R as wt,_ as xt,q as et,I as kt,J as Vt,__tla as Tt}from"./index-1e808f2e.js";import{_ as Ht,__tla as zt}from"./UploadImg-3538b5a5.js";import{E as Et,__tla as bt}from"./el-text-3aab5b45.js";import{u as Ut,__tla as Dt}from"./util-c224e2d8.js";import{_ as Ct,__tla as It}from"./AppLinkSelectDialog.vue_vue_type_script_setup_true_lang-72ebdee0.js";import{_ as Pt,__tla as Lt}from"./Dialog-f44f9d78.js";import{E as Xt,__tla as Ft}from"./el-image-263fb014.js";import{__tla as Mt}from"./el-image-viewer-dddb6285.js";import{_ as at}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Wt}from"./el-card-03b3588b.js";import{__tla as Ot}from"./index-f20e229f.js";import"./color-6e929987.js";import{__tla as Rt}from"./index-b59955b6.js";import{__tla as $t}from"./useMessage-5f9e8917.js";import{__tla as At}from"./Qrcode-ef77d611.js";import{__tla as Gt}from"./IFrame.vue_vue_type_script_setup_true_lang-7fdb7432.js";import{__tla as jt}from"./vuedraggable.umd-66af1f13.js";import{__tla as Yt}from"./el-collapse-item-e45787ff.js";import{__tla as Zt}from"./ProductCategorySelect.vue_vue_type_script_setup_true_lang-ea31325e.js";import{__tla as qt}from"./el-tree-select-e8e05888.js";import"./tree-fd3a041e.js";import{__tla as Bt}from"./category-9d0fc28e.js";let lt,Jt=Promise.all([(()=>{try{return mt}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return Yt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return Bt}catch{}})()]).then(async()=>{var rt=Array.prototype.splice;function ot(e,d){var v=[];if(!e||!e.length)return v;var f=-1,l=[],s=e.length;for(d=ht(d);++f<s;){var n=e[f];d(n,f,e)&&(v.push(n),l.push(f))}return function(i,o){for(var p=i?o.length:0,g=p-1;p--;){var _=o[p];if(p==g||_!==E){var E=_;dt(_)?rt.call(i,_,1):ft(i,_)}}}(e,l),v}const U=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 R,I,$,A,G,j;R=[{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,d,v)=>{d.stopPropagation();const{clientX:f,clientY:l}=d,{left:s,top:n,width:i,height:o}=e;document.onmousemove=p=>{const g=p.clientX-f,_=p.clientY-l;v(s,n,i,o,g,_)},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}},$=["onMousedown","onDblclick"],A={class:"pointer-events-none select-none"},G=["onMousedown"],j=at(K({name:"HotZoneEditDialog",__name:"index",props:{modelValue:yt(),imgUrl:vt().def("")},emits:["update:modelValue"],setup(e,{expose:d,emit:v}){const f=e,l=v,s=T([]),n=T(!1);d({open:()=>{var a;s.value=(a=f.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=T(),o=()=>{s.value.push({width:U,height:U,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>=U&&a.left+t<=i.value.offsetWidth&&(a.width=t)},E=(a,t)=>{t>=U&&a.top+t<=i.value.offsetHeight&&(a.height=t)},P=()=>{n.value=!1},L=()=>{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=T(),Y=T(),st=a=>{a&&h.value&&(h.value.name=a.name,h.value.url=a.path)};return(a,t)=>{const x=Xt,X=xt,Z=et,nt=Pt,it=Ct;return H(),z(C,null,[r(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:L},{footer:y(()=>[r(Z,{onClick:o,type:"primary",plain:""},{default:y(()=>[r(X,{icon:"ep:plus",class:"mr-5px"}),D(" \u6DFB\u52A0\u70ED\u533A ")]),_:1}),r(Z,{onClick:P,type:"primary",plain:""},{default:y(()=>[r(X,{icon:"ep:check",class:"mr-5px"}),D(" \u786E\u5B9A ")]),_:1})]),default:y(()=>[N("div",{ref_key:"container",ref:i,class:"relative h-full w-750px"},[r(x,{src:e.imgUrl,class:"pointer-events-none h-full w-750px select-none"},null,8,["src"]),(H(!0),z(C,null,S(m(s),(c,pt)=>(H(),z("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:V=>((u,F)=>{I(u,F,(k,b,q,B,M,W)=>{p(u,k+M),g(u,b+W)})})(c,V),onDblclick:V=>{return u=c,h.value=u,void Y.value.open(u.url);var u}},[N("span",A,gt(c.name||"\u53CC\u51FB\u9009\u62E9\u94FE\u63A5"),1),r(X,{icon:"ep:close",class:"delete",size:14,onClick:V=>{return u=c,void ot(s.value,u);var u}},null,8,["onClick"]),(H(!0),z(C,null,S(m(R),(V,u)=>(H(),z("span",{class:"ctrl-dot",key:u,style:tt(V.style),onMousedown:F=>((k,b,q)=>{I(k,q,(B,M,W,ut,J,Q)=>{b.types.forEach(_t=>{switch(_t){case w.LEFT:p(k,B+J);break;case w.TOP:g(k,M+Q);break;case w.WIDTH:{const O=b.types.includes(w.LEFT)?-1:1;_(k,W+J*O)}break;case w.HEIGHT:{const O=b.types.includes(w.TOP)?-1:1;E(k,ut+Q*O)}}})})})(c,V,F)},null,44,G))),128))],44,$))),128))],512)]),_:1},8,["modelValue"]),r(it,{ref_key:"appLinkDialogRef",ref:Y,onAppLinkChange:st},null,512)],64)}}}),[["__scopeId","data-v-87299d43"]]),lt=at(K({name:"HotZoneProperty",__name:"property",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:d}){const v=e,f=d,{formData:l}=Ut(v.modelValue,f),s=T(),n=()=>{s.value.open()};return(i,o)=>{const p=Et,g=Ht,_=kt,E=Vt,P=et,L=ct;return H(),z(C,null,[r(L,{modelValue:m(l).style,"onUpdate:modelValue":o[1]||(o[1]=h=>m(l).style=h)},{default:y(()=>[r(E,{"label-width":"80px",model:m(l),class:"m-t-8px"},{default:y(()=>[r(_,{label:"\u4E0A\u4F20\u56FE\u7247",prop:"imgUrl"},{default:y(()=>[r(g,{modelValue:m(l).imgUrl,"onUpdate:modelValue":o[0]||(o[0]=h=>m(l).imgUrl=h),height:"50px",width:"auto",class:"min-w-80px"},{tip:y(()=>[r(p,{type:"info",size:"small"},{default:y(()=>[D(" \u63A8\u8350\u5BBD\u5EA6 750")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"]),r(P,{type:"primary",plain:"",class:"w-full",onClick:n},{default:y(()=>[D(" \u8BBE\u7F6E\u70ED\u533A ")]),_:1})]),_:1},8,["modelValue"]),r(j,{ref_key:"editDialogRef",ref:s,modelValue:m(l).list,"onUpdate:modelValue":o[2]||(o[2]=h=>m(l).list=h),"img-url":m(l).imgUrl},null,8,["modelValue","img-url"])],64)}}}),[["__scopeId","data-v-601dfee5"]])});export{Jt as __tla,lt as default};
|