1 |
- import{_ as ee,__tla as te}from"./ComponentContainerProperty-05f4c99c.js";import{d as Q,aQ as ae,ac as A,r as R,aM as G,o as n,c as d,g as J,F as U,v as D,T as le,ao as L,f as l,a as o,a0 as N,y as T,t as oe,j as re,_ as W,x as ue,w as y,C as se,cK as ie,H as _e,__tla as me}from"./index-8dc1e40a.js";import{_ as ne,__tla as ce}from"./index-0e06ce3c.js";import{_ as pe,__tla as de}from"./UploadImg-c2c75279.js";import{E as fe,__tla as he}from"./el-text-13e93c25.js";import{u as ye,__tla as ve}from"./util-6f9e53a1.js";import{__tla as be}from"./el-card-18df90f0.js";import{__tla as Ve}from"./index-0f4b3d5e.js";import"./color-6e929987.js";import{__tla as xe}from"./AppLinkSelectDialog-4ba8225c.js";import{__tla as we}from"./Dialog-41802231.js";import{__tla as ge}from"./ProductCategorySelect-94eeee28.js";import{__tla as ke}from"./el-tree-select-d82790d8.js";import"./tree-0af4953a.js";import{__tla as Ue}from"./category-e7433506.js";import{__tla as ze}from"./index-519182c1.js";import{__tla as Ce}from"./el-image-viewer-3b8905e6.js";import{__tla as Se}from"./useMessage-7a27dd80.js";import{__tla as Re}from"./Qrcode-b0c88a5f.js";import{__tla as Me}from"./IFrame-e28a12d4.js";import{__tla as $e}from"./vuedraggable.umd-3e3e7da3.js";import{__tla as De}from"./el-collapse-item-7e888ef0.js";let Y,Ee=Promise.all([(()=>{try{return te}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return Me}catch{}})(),(()=>{try{return $e}catch{}})(),(()=>{try{return De}catch{}})()]).then(async()=>{let E,B,q,P,X,F,I;E=(_,g)=>{const[u,s]=[_.x,g.x].sort(),[e,c]=[_.y,g.y].sort(),V=s+1,x=c+1;return{left:u,right:V,top:e,bottom:x,height:x-e,width:V-u}},B={class:"relative"},q={class:"cube-table"},P=["onClick","onMouseenter"],X=["onClick"],F=["onClick"],I=W(Q({name:"MagicCubeEditor",__name:"index",props:{modelValue:ae().isRequired,rows:A.number.def(4),cols:A.number.def(4),cubeSize:A.number.def(75)},emits:["update:modelValue","hotAreaSelected"],setup(_,{emit:g}){const u=_,s=R([]);G(()=>[u.rows,u.cols],()=>{if(s.value=[],u.rows&&u.cols)for(let i=0;i<u.rows;i++){s.value[i]=[];for(let a=0;a<u.cols;a++)s.value[i].push({x:a,y:i,active:!1})}},{immediate:!0});const e=R([]);G(()=>u.modelValue,()=>e.value=u.modelValue||[],{immediate:!0});const c=R(),V=()=>!!c.value,x=g,r=()=>x("update:modelValue",e),z=R(-1),M=(i,a)=>{z.value=a,x("hotAreaSelected",i,a)};function k(){v((i,a,m)=>{m.active&&(m.active=!1)}),c.value=void 0}const v=i=>{for(let a=0;a<s.value.length;a++)for(let m=0;m<s.value[a].length;m++)i(a,m,s.value[a][m])};return(i,a)=>{const m=re;return n(),d("div",B,[J("table",q,[J("tbody",null,[(n(!0),d(U,null,D(o(s),(p,t)=>(n(),d("tr",{key:t},[(n(!0),d(U,null,D(p,(b,f)=>(n(),d("td",{key:f,class:le(["cube",{active:b.active}]),style:L({width:`${_.cubeSize}px`,height:`${_.cubeSize}px`}),onClick:Z=>((H,j)=>{const C=s.value[H][j];if(!V())return c.value=C,void(c.value.active=!0);e.value.push(E(c.value,C)),k();let h=e.value.length-1;M(e.value[h],h),r()})(t,f),onMouseenter:Z=>((H,j)=>{if(!V())return;const C=E(c.value,s.value[H][j]);for(const K of e.value)if(w=C,(h=K).left<w.left+w.width&&h.left+h.width>w.left&&h.top<w.top+w.height&&h.height+h.top>w.top)return void k();var h,w;v((K,He,O)=>{var S,$;O.active=(S=C,($=O).x>=S.left&&$.x<S.right&&$.y>=S.top&&$.y<S.bottom)})})(t,f)},[l(m,{icon:"ep-plus"})],46,P))),128))]))),128))]),(n(!0),d(U,null,D(o(e),(p,t)=>(n(),d("div",{key:t,class:"hot-area",style:L({top:_.cubeSize*p.top+"px",left:_.cubeSize*p.left+"px",height:_.cubeSize*p.height+"px",width:_.cubeSize*p.width+"px"}),onClick:b=>M(p,t),onMouseover:k},[o(z)===t?(n(),d("div",{key:0,class:"btn-delete",onClick:b=>(f=>{e.value.splice(f,1),k(),r()})(t)},[l(m,{icon:"ep:circle-close-filled"})],8,F)):N("",!0),T(" "+oe(`${p.width}\xD7${p.height}`),1)],44,X))),128))])])}}}),[["__scopeId","data-v-d5b18453"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/components/MagicCubeEditor/index.vue"]]),Y=W(Q({name:"MagicCubeProperty",__name:"property",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(_,{emit:g}){const u=_,s=g,{formData:e}=ye(u.modelValue,s),c=R(-1),V=(x,r)=>{c.value=r};return(x,r)=>{const z=fe,M=I,k=pe,v=se,i=ne,a=ie,m=_e,p=ee;return n(),ue(p,{modelValue:o(e).style,"onUpdate:modelValue":r[4]||(r[4]=t=>o(e).style=t)},{default:y(()=>[l(m,{"label-width":"80px",model:o(e),class:"m-t-8px"},{default:y(()=>[l(z,{tag:"p"},{default:y(()=>[T(" \u9B54\u65B9\u8BBE\u7F6E ")]),_:1}),l(z,{type:"info",size:"small"},{default:y(()=>[T(" \u6BCF\u683C\u5C3A\u5BF8187 * 187 ")]),_:1}),l(M,{class:"m-y-16px",modelValue:o(e).list,"onUpdate:modelValue":r[0]||(r[0]=t=>o(e).list=t),rows:4,cols:4,onHotAreaSelected:V},null,8,["modelValue"]),(n(!0),d(U,null,D(o(e).list,(t,b)=>(n(),d(U,{key:b},[o(c)===b?(n(),d(U,{key:0},[l(v,{label:"\u4E0A\u4F20\u56FE\u7247",prop:`list[${b}].imgUrl`},{default:y(()=>[l(k,{modelValue:t.imgUrl,"onUpdate:modelValue":f=>t.imgUrl=f,height:"80px",width:"80px"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"]),l(v,{label:"\u94FE\u63A5",prop:`list[${b}].url`},{default:y(()=>[l(i,{modelValue:t.url,"onUpdate:modelValue":f=>t.url=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])],64)):N("",!0)],64))),128)),l(v,{label:"\u4E0A\u5706\u89D2",prop:"borderRadiusTop"},{default:y(()=>[l(a,{modelValue:o(e).borderRadiusTop,"onUpdate:modelValue":r[1]||(r[1]=t=>o(e).borderRadiusTop=t),max:100,min:0,"show-input":"","input-size":"small","show-input-controls":!1},null,8,["modelValue"])]),_:1}),l(v,{label:"\u4E0B\u5706\u89D2",prop:"borderRadiusBottom"},{default:y(()=>[l(a,{modelValue:o(e).borderRadiusBottom,"onUpdate:modelValue":r[2]||(r[2]=t=>o(e).borderRadiusBottom=t),max:100,min:0,"show-input":"","input-size":"small","show-input-controls":!1},null,8,["modelValue"])]),_:1}),l(v,{label:"\u95F4\u9694",prop:"space"},{default:y(()=>[l(a,{modelValue:o(e).space,"onUpdate:modelValue":r[3]||(r[3]=t=>o(e).space=t),max:100,min:0,"show-input":"","input-size":"small","show-input-controls":!1},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/components/DiyEditor/components/mobile/MagicCube/property.vue"]])});export{Ee as __tla,Y as default};
|