property-01f3b791.js 7.4 KB

1
  1. import{_ as ct,__tla as mt}from"./ComponentContainerProperty-164fa143.js";import{eI as ft,eJ as dt,eK as ht,d as N,dX as yt,eL as vt,r as T,o as H,c as E,f as r,B as y,E as I,C as Q,F as D,R as S,a as m,aG as tt,G as gt,a2 as wt,_ as xt,K as at,V as Vt,W as kt,__tla as Tt}from"./index-e8bff8cb.js";import{_ as Ht,__tla as Et}from"./UploadImg-7600c145.js";import{E as zt,__tla as Ut}from"./el-text-f88c4dda.js";import{u as bt,__tla as It}from"./util-6f397195.js";import{_ as Dt,__tla as Ct}from"./AppLinkSelectDialog.vue_vue_type_script_setup_true_lang-b8999ef1.js";import{_ as Lt,__tla as Pt}from"./Dialog-4d17ac25.js";import{E as Xt,__tla as Gt}from"./el-image-7cacfc0f.js";import{__tla as Wt}from"./el-image-viewer-aab7739e.js";import{_ as et}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ft}from"./el-card-f9558d99.js";import{__tla as Mt}from"./index-7c100f3c.js";import"./color-6e929987.js";import{__tla as Ot}from"./index-32ca9885.js";import{__tla as $t}from"./useMessage-de42a595.js";import{__tla as Kt}from"./Qrcode-5bbe47fe.js";import{__tla as At}from"./IFrame.vue_vue_type_script_setup_true_lang-11295655.js";import{__tla as Rt}from"./vuedraggable.umd-e6dc7eda.js";import{__tla as jt}from"./el-collapse-item-4651ee33.js";import{__tla as Yt}from"./ProductCategorySelect.vue_vue_type_script_setup_true_lang-be5d26e7.js";import{__tla as Zt}from"./el-tree-select-d9ced475.js";import"./tree-0af4953a.js";import{__tla as Bt}from"./category-fea8d45b.js";let lt,Jt=Promise.all([(()=>{try{return mt}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return Ut}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return Pt}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return Yt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return Bt}catch{}})()]).then(async()=>{var rt=Array.prototype.splice;function ot(a,f){var v=[];if(!a||!a.length)return v;var d=-1,l=[],s=a.length;for(f=ht(f);++d<s;){var n=a[d];f(n,d,a)&&(v.push(n),l.push(d))}return function(i,o){for(var p=i?o.length:0,g=p-1;p--;){var _=o[p];if(p==g||_!==z){var z=_;ft(_)?rt.call(i,_,1):dt(i,_)}}}(a,l),v}const b=100;var w=(a=>(a[a.LEFT=0]="LEFT",a[a.TOP=1]="TOP",a[a.WIDTH=2]="WIDTH",a[a.HEIGHT=3]="HEIGHT",a))(w||{});let O,C,$,K,A,R;O=[{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%)"}}],C=(a,f,v)=>{f.stopPropagation();const{clientX:d,clientY:l}=f,{left:s,top:n,width:i,height:o}=a;document.onmousemove=p=>{const g=p.clientX-d,_=p.clientY-l;v(s,n,i,o,g,_)},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}},$=["onMousedown","onDblclick"],K={class:"pointer-events-none select-none"},A=["onMousedown"],R=et(N({name:"HotZoneEditDialog",__name:"index",props:{modelValue:yt(),imgUrl:vt().def("")},emits:["update:modelValue"],setup(a,{expose:f,emit:v}){const d=a,l=v,s=T([]),n=T(!1);f({open:()=>{var e;s.value=(e=d.modelValue,(e==null?void 0:e.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:b,height:b,top:0,left:0})},p=(e,t)=>{t>=0&&t<=i.value.offsetWidth-e.width&&(e.left=t)},g=(e,t)=>{t>=0&&t<=i.value.offsetHeight-e.height&&(e.top=t)},_=(e,t)=>{t>=b&&e.left+t<=i.value.offsetWidth&&(e.width=t)},z=(e,t)=>{t>=b&&e.top+t<=i.value.offsetHeight&&(e.height=t)},L=()=>{n.value=!1},P=()=>{const e=(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",e)},h=T(),j=T(),st=e=>{e&&h.value&&(h.value.name=e.name,h.value.url=e.path)};return(e,t)=>{const x=Xt,X=xt,Y=at,nt=Lt,it=Dt;return H(),E(D,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:P},{footer:y(()=>[r(Y,{onClick:o,type:"primary",plain:""},{default:y(()=>[r(X,{icon:"ep:plus",class:"mr-5px"}),I(" \u6DFB\u52A0\u70ED\u533A ")]),_:1}),r(Y,{onClick:L,type:"primary",plain:""},{default:y(()=>[r(X,{icon:"ep:check",class:"mr-5px"}),I(" \u786E\u5B9A ")]),_:1})]),default:y(()=>[Q("div",{ref_key:"container",ref:i,class:"relative h-full w-750px"},[r(x,{src:a.imgUrl,class:"pointer-events-none h-full w-750px select-none"},null,8,["src"]),(H(!0),E(D,null,S(m(s),(c,pt)=>(H(),E("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:k=>((u,G)=>{C(u,G,(V,U,Z,B,W,F)=>{p(u,V+W),g(u,U+F)})})(c,k),onDblclick:k=>{return u=c,h.value=u,void j.value.open(u.url);var u}},[Q("span",K,gt(c.name||"\u53CC\u51FB\u9009\u62E9\u94FE\u63A5"),1),r(X,{icon:"ep:close",class:"delete",size:14,onClick:k=>{return u=c,void ot(s.value,u);var u}},null,8,["onClick"]),(H(!0),E(D,null,S(m(O),(k,u)=>(H(),E("span",{class:"ctrl-dot",key:u,style:tt(k.style),onMousedown:G=>((V,U,Z)=>{C(V,Z,(B,W,F,ut,J,q)=>{U.types.forEach(_t=>{switch(_t){case w.LEFT:p(V,B+J);break;case w.TOP:g(V,W+q);break;case w.WIDTH:{const M=U.types.includes(w.LEFT)?-1:1;_(V,F+J*M)}break;case w.HEIGHT:{const M=U.types.includes(w.TOP)?-1:1;z(V,ut+q*M)}}})})})(c,k,G)},null,44,A))),128))],44,$))),128))],512)]),_:1},8,["modelValue"]),r(it,{ref_key:"appLinkDialogRef",ref:j,onAppLinkChange:st},null,512)],64)}}}),[["__scopeId","data-v-87299d43"]]),lt=et(N({name:"HotZoneProperty",__name:"property",props:{modelValue:{}},emits:["update:modelValue"],setup(a,{emit:f}){const v=a,d=f,{formData:l}=bt(v.modelValue,d),s=T(),n=()=>{s.value.open()};return(i,o)=>{const p=zt,g=Ht,_=Vt,z=kt,L=at,P=ct;return H(),E(D,null,[r(P,{modelValue:m(l).style,"onUpdate:modelValue":o[1]||(o[1]=h=>m(l).style=h)},{default:y(()=>[r(z,{"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(()=>[I(" \u63A8\u8350\u5BBD\u5EA6 750")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"]),r(L,{type:"primary",plain:"",class:"w-full",onClick:n},{default:y(()=>[I(" \u8BBE\u7F6E\u70ED\u533A ")]),_:1})]),_:1},8,["modelValue"]),r(R,{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};