property-44b1b446.js 6.5 KB

1
  1. import{_ as ee,__tla as te}from"./ComponentContainerProperty-c8be2893.js";import{d as G,aQ as ae,ac as A,r as M,aM as J,o as m,c as p,g as L,F as k,v as D,T as le,ao as N,f as l,a as o,a0 as W,y as B,t as oe,j as re,_ as X,x as ue,w as y,C as se,cK as ie,H as _e,__tla as ne}from"./index-327f993b.js";import{_ as me,__tla as ce}from"./index-331f1f4a.js";import{_ as de,__tla as pe}from"./UploadImg-6ec4129d.js";import{E as he,__tla as fe}from"./el-text-dccec509.js";import{u as ye,__tla as ve}from"./util-9652d8a9.js";import{__tla as be}from"./el-card-5aa8b203.js";import{__tla as Ve}from"./index-45786128.js";import"./color-6e929987.js";import{__tla as xe}from"./AppLinkSelectDialog-886ba3fb.js";import{__tla as ge}from"./Dialog-172e53a1.js";import{__tla as we}from"./ProductCategorySelect-a5f4319f.js";import{__tla as ze}from"./el-tree-select-ece8cdbe.js";import"./tree-0af4953a.js";import{__tla as ke}from"./category-60bbc2d0.js";import{__tla as Ue}from"./index-0a6e5e60.js";import{__tla as Ce}from"./el-image-viewer-30346ca4.js";import{__tla as Se}from"./useMessage-b42f14d5.js";import{__tla as Me}from"./Qrcode-67b2893e.js";import{__tla as Re}from"./IFrame-2f157ffe.js";import{__tla as $e}from"./vuedraggable.umd-5d808901.js";import{__tla as De}from"./el-collapse-item-a3f6e5f9.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 ge}catch{}})(),(()=>{try{return we}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,q,H,P,F,I,K;E=(_,w)=>{const[u,s]=[_.x,w.x].sort(),[e,c]=[_.y,w.y].sort(),V=s+1,x=c+1;return{left:u,right:V,top:e,bottom:x,height:x-e,width:V-u}},q={class:"relative"},H={class:"cube-table"},P=["onClick","onMouseenter"],F=["onClick"],I=["onClick"],K=X(G({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:w}){const u=_,s=M([]);J(()=>[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([]);J(()=>u.modelValue,()=>e.value=u.modelValue||[],{immediate:!0});const c=M(),V=()=>!!c.value,x=w,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",q,[L("table",H,[L("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:N({width:`${_.cubeSize}px`,height:`${_.cubeSize}px`}),onClick:Z=>((T,j)=>{const C=s.value[T][j];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=>((T,j)=>{if(!V())return;const C=E(c.value,s.value[T][j]);for(const O of e.value)if(g=C,(f=O).left<g.left+g.width&&f.left+f.width>g.left&&f.top<g.top+g.height&&f.height+f.top>g.top)return void z();var f,g;v((O,Te,Q)=>{var S,$;Q.active=(S=C,($=Q).x>=S.left&&$.x<S.right&&$.y>=S.top&&$.y<S.bottom)})})(t,h)},[l(n,{icon:"ep-plus"})],46,P))),128))]))),128))]),(m(!0),p(k,null,D(o(e),(d,t)=>(m(),p("div",{key:t,class:"hot-area",style:N({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,I)):W("",!0),B(" "+oe(`${d.width}\xD7${d.height}`),1)],44,F))),128))])])}}}),[["__scopeId","data-v-d5b18453"],["__file","D:/zhongxing/mall-newfeifan-zx-admin/src/components/MagicCubeEditor/index.vue"]]),Y=X(G({name:"MagicCubeProperty",__name:"property",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(_,{emit:w}){const u=_,s=w,{formData:e}=ye(u.modelValue,s),c=M(-1),V=(x,r)=>{c.value=r};return(x,r)=>{const U=he,R=K,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(()=>[B(" \u9B54\u65B9\u8BBE\u7F6E ")]),_:1}),l(U,{type:"info",size:"small"},{default:y(()=>[B(" \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:/zhongxing/mall-newfeifan-zx-admin/src/components/DiyEditor/components/mobile/MagicCube/property.vue"]])});export{Ee as __tla,Y as default};