property-c9b4829e.js 7.4 KB

1
  1. import{_ as ct,__tla as mt}from"./ComponentContainerProperty-540b9384.js";import{eC as ft,eD as dt,eE as ht,d as J,dP as yt,eF as vt,r as T,o as E,c as H,f as r,w as y,m as U,g as K,F as C,n as Q,a as m,at as tt,t as gt,N as wt,_ as xt,B as et,z as Vt,C as kt,__tla as Tt}from"./index-2eab2d23.js";import{_ as Et,__tla as Ht}from"./UploadImg-90fe71c2.js";import{E as zt,__tla as bt}from"./el-text-b1163e3d.js";import{u as Dt,__tla as Ut}from"./util-8a54c07a.js";import{_ as Ct,__tla as It}from"./AppLinkSelectDialog.vue_vue_type_script_setup_true_lang-8a855232.js";import{_ as Pt,__tla as Ft}from"./Dialog-c2716df6.js";import{E as Lt,__tla as Xt}from"./el-image-2171f3ff.js";import{__tla as Ot}from"./el-image-viewer-5d14bc77.js";import{_ as at}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Wt}from"./el-card-c558f0ec.js";import{__tla as $t}from"./index-30d48444.js";import"./color-6e929987.js";import{__tla as Mt}from"./index-d3f876ab.js";import{__tla as Gt}from"./useMessage-171aa63e.js";import{__tla as At}from"./Qrcode-a57a527d.js";import{__tla as jt}from"./IFrame.vue_vue_type_script_setup_true_lang-82b81649.js";import{__tla as Rt}from"./vuedraggable.umd-67523a5c.js";import{__tla as Yt}from"./el-collapse-item-5ecf4321.js";import{__tla as Zt}from"./ProductCategorySelect.vue_vue_type_script_setup_true_lang-997a9041.js";import{__tla as Bt}from"./el-tree-select-4ae7c290.js";import"./tree-fd3a041e.js";import{__tla as Nt}from"./category-c573377b.js";let lt,St=Promise.all([(()=>{try{return mt}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return Ut}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return Xt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return Yt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return Nt}catch{}})()]).then(async()=>{var rt=Array.prototype.splice;function ot(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,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,_)}}}(e,l),v}const D=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,I,G,A,j,R;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%)"}}],I=(e,f,v)=>{f.stopPropagation();const{clientX:d,clientY:l}=f,{left:s,top:n,width:i,height:o}=e;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}},G=["onMousedown","onDblclick"],A={class:"pointer-events-none select-none"},j=["onMousedown"],R=at(J({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=T([]),n=T(!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=T(),o=()=>{s.value.push({width:D,height:D,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>=D&&a.left+t<=i.value.offsetWidth&&(a.width=t)},z=(a,t)=>{t>=D&&a.top+t<=i.value.offsetHeight&&(a.height=t)},P=()=>{n.value=!1},F=()=>{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=Lt,L=xt,Z=et,nt=Pt,it=Ct;return E(),H(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:F},{footer:y(()=>[r(Z,{onClick:o,type:"primary",plain:""},{default:y(()=>[r(L,{icon:"ep:plus",class:"mr-5px"}),U(" \u6DFB\u52A0\u70ED\u533A ")]),_:1}),r(Z,{onClick:P,type:"primary",plain:""},{default:y(()=>[r(L,{icon:"ep:check",class:"mr-5px"}),U(" \u786E\u5B9A ")]),_:1})]),default:y(()=>[K("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"]),(E(!0),H(C,null,Q(m(s),(c,pt)=>(E(),H("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,X)=>{I(u,X,(V,b,B,N,O,W)=>{p(u,V+O),g(u,b+W)})})(c,k),onDblclick:k=>{return u=c,h.value=u,void Y.value.open(u.url);var u}},[K("span",A,gt(c.name||"\u53CC\u51FB\u9009\u62E9\u94FE\u63A5"),1),r(L,{icon:"ep:close",class:"delete",size:14,onClick:k=>{return u=c,void ot(s.value,u);var u}},null,8,["onClick"]),(E(!0),H(C,null,Q(m(M),(k,u)=>(E(),H("span",{class:"ctrl-dot",key:u,style:tt(k.style),onMousedown:X=>((V,b,B)=>{I(V,B,(N,O,W,ut,S,q)=>{b.types.forEach(_t=>{switch(_t){case w.LEFT:p(V,N+S);break;case w.TOP:g(V,O+q);break;case w.WIDTH:{const $=b.types.includes(w.LEFT)?-1:1;_(V,W+S*$)}break;case w.HEIGHT:{const $=b.types.includes(w.TOP)?-1:1;z(V,ut+q*$)}}})})})(c,k,X)},null,44,j))),128))],44,G))),128))],512)]),_:1},8,["modelValue"]),r(it,{ref_key:"appLinkDialogRef",ref:Y,onAppLinkChange:st},null,512)],64)}}}),[["__scopeId","data-v-87299d43"]]),lt=at(J({name:"HotZoneProperty",__name:"property",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:f}){const v=e,d=f,{formData:l}=Dt(v.modelValue,d),s=T(),n=()=>{s.value.open()};return(i,o)=>{const p=zt,g=Et,_=Vt,z=kt,P=et,F=ct;return E(),H(C,null,[r(F,{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(()=>[U(" \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(()=>[U(" \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{St as __tla,lt as default};