1 |
- import{_ as ee,__tla as te}from"./ComponentContainerProperty-a12b38ea.js";import{d as K,dP as ae,ai as B,r as M,O as L,o as m,c as p,j as N,F as k,C as D,a1 as le,ay as Q,i as l,a as o,S as W,l as I,t as oe,n as re,_ as X,k as ue,w as y,I as se,d3 as ie,J as _e,__tla as ne}from"./index-3ec1f57f.js";import{_ as me,__tla as ce}from"./index-ec834c19.js";import{_ as de,__tla as pe}from"./UploadImg-940c9b4b.js";import{E as he,__tla as fe}from"./el-text-1b7c8570.js";import{u as ye,__tla as ve}from"./util-e6b8c413.js";import{__tla as be}from"./el-card-fa98d598.js";import{__tla as Ve}from"./index-160afe68.js";import"./color-6e929987.js";import{__tla as xe}from"./AppLinkSelectDialog-e6931778.js";import{__tla as we}from"./Dialog-a920f067.js";import{__tla as ge}from"./ProductCategorySelect-9712bf06.js";import{__tla as ze}from"./el-tree-select-ab16e356.js";import"./tree-0af4953a.js";import{__tla as ke}from"./category-02d9c766.js";import{__tla as Ue}from"./index-9c2b6480.js";import{__tla as Ce}from"./el-image-viewer-d068c5ce.js";import{__tla as Se}from"./useMessage-40198045.js";import{__tla as Me}from"./Qrcode-cf403378.js";import{__tla as Re}from"./IFrame-a2634d2e.js";import{__tla as $e}from"./vuedraggable.umd-4904efc9.js";import{__tla as De}from"./el-collapse-item-ec0e379c.js";let Y,Ee=Promise.all([(()=>{try{return te}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return fe}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 ze}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return Me}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return $e}catch{}})(),(()=>{try{return De}catch{}})()]).then(async()=>{let E,P,T,q,O,F,H;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}},P={class:"relative"},T={class:"cube-table"},q=["onClick","onMouseenter"],O=["onClick"],F=["onClick"],H=X(K({name:"MagicCubeEditor",__name:"index",props:{modelValue:ae().isRequired,rows:B.number.def(4),cols:B.number.def(4),cubeSize:B.number.def(75)},emits:["update:modelValue","hotAreaSelected"],setup(_,{emit:g}){const u=_,s=M([]);L(()=>[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=M([]);L(()=>u.modelValue,()=>e.value=u.modelValue||[],{immediate:!0});const c=M(),V=()=>!!c.value,x=g,r=()=>x("update:modelValue",e),U=M(-1),R=(i,a)=>{U.value=a,x("hotAreaSelected",i,a)};function z(){v((i,a,n)=>{n.active&&(n.active=!1)}),c.value=void 0}const v=i=>{for(let a=0;a<s.value.length;a++)for(let n=0;n<s.value[a].length;n++)i(a,n,s.value[a][n])};return(i,a)=>{const n=re;return m(),p("div",P,[N("table",T,[N("tbody",null,[(m(!0),p(k,null,D(o(s),(d,t)=>(m(),p("tr",{key:t},[(m(!0),p(k,null,D(d,(b,h)=>(m(),p("td",{key:h,class:le(["cube",{active:b.active}]),style:Q({width:`${_.cubeSize}px`,height:`${_.cubeSize}px`}),onClick:Z=>((j,A)=>{const C=s.value[j][A];if(!V())return c.value=C,void(c.value.active=!0);e.value.push(E(c.value,C)),z();let f=e.value.length-1;R(e.value[f],f),r()})(t,h),onMouseenter:Z=>((j,A)=>{if(!V())return;const C=E(c.value,s.value[j][A]);for(const J of e.value)if(w=C,(f=J).left<w.left+w.width&&f.left+f.width>w.left&&f.top<w.top+w.height&&f.height+f.top>w.top)return void z();var f,w;v((J,je,G)=>{var S,$;G.active=(S=C,($=G).x>=S.left&&$.x<S.right&&$.y>=S.top&&$.y<S.bottom)})})(t,h)},[l(n,{icon:"ep-plus"})],46,q))),128))]))),128))]),(m(!0),p(k,null,D(o(e),(d,t)=>(m(),p("div",{key:t,class:"hot-area",style:Q({top:_.cubeSize*d.top+"px",left:_.cubeSize*d.left+"px",height:_.cubeSize*d.height+"px",width:_.cubeSize*d.width+"px"}),onClick:b=>R(d,t),onMouseover:z},[o(U)===t?(m(),p("div",{key:0,class:"btn-delete",onClick:b=>(h=>{e.value.splice(h,1),z(),r()})(t)},[l(n,{icon:"ep:circle-close-filled"})],8,F)):W("",!0),I(" "+oe(`${d.width}\xD7${d.height}`),1)],44,O))),128))])])}}}),[["__scopeId","data-v-d5b18453"],["__file","D:/zx/mall-newfeifan-zx-business/src/components/MagicCubeEditor/index.vue"]]),Y=X(K({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=M(-1),V=(x,r)=>{c.value=r};return(x,r)=>{const U=he,R=H,z=de,v=se,i=me,a=ie,n=_e,d=ee;return m(),ue(d,{modelValue:o(e).style,"onUpdate:modelValue":r[4]||(r[4]=t=>o(e).style=t)},{default:y(()=>[l(n,{"label-width":"80px",model:o(e),class:"m-t-8px"},{default:y(()=>[l(U,{tag:"p"},{default:y(()=>[I(" \u9B54\u65B9\u8BBE\u7F6E ")]),_:1}),l(U,{type:"info",size:"small"},{default:y(()=>[I(" \u6BCF\u683C\u5C3A\u5BF8187 * 187 ")]),_:1}),l(R,{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"]),(m(!0),p(k,null,D(o(e).list,(t,b)=>(m(),p(k,{key:b},[o(c)===b?(m(),p(k,{key:0},[l(v,{label:"\u4E0A\u4F20\u56FE\u7247",prop:`list[${b}].imgUrl`},{default:y(()=>[l(z,{modelValue:t.imgUrl,"onUpdate:modelValue":h=>t.imgUrl=h,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":h=>t.url=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])],64)):W("",!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","D:/zx/mall-newfeifan-zx-business/src/components/DiyEditor/components/mobile/MagicCube/property.vue"]])});export{Ee as __tla,Y as default};
|