property-4b52b36c.js 7.5 KB

1
  1. import{_ as ct,__tla as mt}from"./ComponentContainerProperty-f112b2fc.js";import{eI as ft,eJ as dt,eK as ht,d as N,dT as yt,eL as vt,r as b,o as z,c as D,f as o,w as y,n as U,g as Q,F as I,q as S,a as m,au as tt,t as gt,O as xt,j as wt,C as et,_ as at,A as Vt,D as kt,__tla as bt}from"./index-297c97b3.js";import{_ as zt,__tla as Dt}from"./UploadImg-76828272.js";import{E as Ht,__tla as Tt}from"./el-text-85a32bfc.js";import{u as Et,__tla as Ut}from"./util-53cb0068.js";import{_ as It,__tla as Ct}from"./AppLinkSelectDialog-85a8d418.js";import{_ as Lt,__tla as Pt}from"./Dialog-6d866407.js";import{E as Ot,__tla as Xt}from"./el-image-82bf40c6.js";import{__tla as Ft}from"./el-image-viewer-3c943bf5.js";import{__tla as Mt}from"./el-card-22a26825.js";import{__tla as Wt}from"./index-d44a77af.js";import"./color-6e929987.js";import{__tla as Zt}from"./index-ef616a81.js";import{__tla as Gt}from"./useMessage-8a849e40.js";import{__tla as $t}from"./Qrcode-dba56d8e.js";import{__tla as jt}from"./IFrame-f1160e27.js";import{__tla as At}from"./vuedraggable.umd-ccb0e6c4.js";import{__tla as qt}from"./el-collapse-item-670e62b3.js";import{__tla as Rt}from"./ProductCategorySelect-cb05d1c5.js";import{__tla as Yt}from"./el-tree-select-4c70bd2d.js";import"./tree-0af4953a.js";import{__tla as Jt}from"./category-d1509c57.js";let lt,Kt=Promise.all([(()=>{try{return mt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return Ut}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return Pt}catch{}})(),(()=>{try{return Xt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return Yt}catch{}})(),(()=>{try{return Jt}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||_!==H){var H=_;ft(_)?ot.call(i,_,1):dt(i,_)}}}(e,l),v}const E=100;var x=(e=>(e[e.LEFT=0]="LEFT",e[e.TOP=1]="TOP",e[e.WIDTH=2]="WIDTH",e[e.HEIGHT=3]="HEIGHT",e))(x||{});let Z,C,G,$,j,A;Z=[{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=(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}},G=["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=b([]),n=b(!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=b(),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)},H=(a,t)=>{t>=E&&a.top+t<=i.value.offsetHeight&&(a.height=t)},L=()=>{n.value=!1},P=()=>{const a=(t=>(t==null?void 0:t.map(w=>({...w,left:w.left/=2,top:w.top/=2,width:w.width/=2,height:w.height/=2})))||[])(s.value);l("update:modelValue",a)},h=b(),q=b(),st=a=>{a&&h.value&&(h.value.name=a.name,h.value.url=a.path)};return(a,t)=>{const w=Ot,O=wt,R=et,nt=Lt,it=It;return z(),D(I,null,[o(nt,{modelValue:m(n),"onUpdate:modelValue":t[0]||(t[0]=c=>xt(n)?n.value=c:null),title:"\u8BBE\u7F6E\u70ED\u533A",width:"780",onClose:P},{footer:y(()=>[o(R,{onClick:r,type:"primary",plain:""},{default:y(()=>[o(O,{icon:"ep:plus",class:"mr-5px"}),U(" \u6DFB\u52A0\u70ED\u533A ")]),_:1}),o(R,{onClick:L,type:"primary",plain:""},{default:y(()=>[o(O,{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(w,{src:e.imgUrl,class:"pointer-events-none h-full w-750px select-none"},null,8,["src"]),(z(!0),D(I,null,S(m(s),(c,pt)=>(z(),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:k=>((u,X)=>{C(u,X,(V,T,Y,J,F,M)=>{p(u,V+F),g(u,T+M)})})(c,k),onDblclick:k=>{return u=c,h.value=u,void q.value.open(u.url);var u}},[Q("span",$,gt(c.name||"\u53CC\u51FB\u9009\u62E9\u94FE\u63A5"),1),o(O,{icon:"ep:close",class:"delete",size:14,onClick:k=>{return u=c,void rt(s.value,u);var u}},null,8,["onClick"]),(z(!0),D(I,null,S(m(Z),(k,u)=>(z(),D("span",{class:"ctrl-dot",key:u,style:tt(k.style),onMousedown:X=>((V,T,Y)=>{C(V,Y,(J,F,M,ut,K,B)=>{T.types.forEach(_t=>{switch(_t){case x.LEFT:p(V,J+K);break;case x.TOP:g(V,F+B);break;case x.WIDTH:{const W=T.types.includes(x.LEFT)?-1:1;_(V,M+K*W)}break;case x.HEIGHT:{const W=T.types.includes(x.TOP)?-1:1;H(V,ut+B*W)}}})})})(c,k,X)},null,44,j))),128))],44,G))),128))],512)]),_:1},8,["modelValue"]),o(it,{ref_key:"appLinkDialogRef",ref:q,onAppLinkChange:st},null,512)],64)}}}),[["__scopeId","data-v-e60b1a26"],["__file","D:/zx/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=b(),n=()=>{s.value.open()};return(i,r)=>{const p=Ht,g=zt,_=Vt,H=kt,L=et,P=ct;return z(),D(I,null,[o(P,{modelValue:m(l).style,"onUpdate:modelValue":r[1]||(r[1]=h=>m(l).style=h)},{default:y(()=>[o(H,{"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(L,{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","D:/zx/mall-newfeifan-zx-admin/src/components/DiyEditor/components/mobile/HotZone/property.vue"]])});export{Kt as __tla,lt as default};