property-d437d06a.js 6.6 KB

1
  1. import{_ as ee,__tla as te}from"./ComponentContainerProperty-186c5bb7.js";import{d as W,aT as ae,p as H,r as M,aP as J,o as n,c as p,g as L,F as U,k as $,W as le,ar as N,i as l,a as o,a2 as Q,j as T,t as oe,v as re,_ as X,l as ue,w as y,H as se,c0 as ie,K as _e,__tla as me}from"./index-390579cd.js";import{_ as ne,__tla as ce}from"./index-b54509c3.js";import{_ as de,__tla as pe}from"./UploadImg-7d2a5bd9.js";import{E as fe,__tla as he}from"./el-text-f5b70c3f.js";import{u as ye,__tla as ve}from"./util-9dc74d64.js";import{__tla as be}from"./el-card-f2f59395.js";import{__tla as Ve}from"./index-4cb0eb49.js";import"./color-6e929987.js";import{__tla as we}from"./AppLinkSelectDialog-767821ab.js";import{__tla as xe}from"./Dialog-cc73e431.js";import{__tla as ge}from"./ProductCategorySelect-0b509f89.js";import{__tla as ke}from"./el-tree-select-ab238926.js";import"./tree-0af4953a.js";import{__tla as Ue}from"./category-aef51cc4.js";import{__tla as ze}from"./index-0046df56.js";import{__tla as Ce}from"./el-image-viewer-2414ea0c.js";import{__tla as Se}from"./useMessage-6684a162.js";import{__tla as Me}from"./Qrcode-67e68fb5.js";import{__tla as Re}from"./IFrame-5ee0e528.js";import{__tla as Ee}from"./vuedraggable.umd-cd20d516.js";import{__tla as $e}from"./el-collapse-item-287cd4d0.js";let Y,Ae=Promise.all([(()=>{try{return te}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return xe}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 Me}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return $e}catch{}})()]).then(async()=>{let A,B,D,O,q,G,F;A=(_,g)=>{const[u,s]=[_.x,g.x].sort(),[e,c]=[_.y,g.y].sort(),V=s+1,w=c+1;return{left:u,right:V,top:e,bottom:w,height:w-e,width:V-u}},B={class:"relative"},D={class:"cube-table"},O=["onClick","onMouseenter"],q=["onClick"],G=["onClick"],F=X(W({name:"MagicCubeEditor",__name:"index",props:{modelValue:ae().isRequired,rows:H.number.def(4),cols:H.number.def(4),cubeSize:H.number.def(75)},emits:["update:modelValue","hotAreaSelected"],setup(_,{emit:g}){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,w=g,r=()=>w("update:modelValue",e),z=M(-1),R=(i,a)=>{z.value=a,w("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(),p("div",B,[L("table",D,[L("tbody",null,[(n(!0),p(U,null,$(o(s),(d,t)=>(n(),p("tr",{key:t},[(n(!0),p(U,null,$(d,(b,f)=>(n(),p("td",{key:f,class:le(["cube",{active:b.active}]),style:N({width:`${_.cubeSize}px`,height:`${_.cubeSize}px`}),onClick:Z=>((P,j)=>{const C=s.value[P][j];if(!V())return c.value=C,void(c.value.active=!0);e.value.push(A(c.value,C)),k();let h=e.value.length-1;R(e.value[h],h),r()})(t,f),onMouseenter:Z=>((P,j)=>{if(!V())return;const C=A(c.value,s.value[P][j]);for(const I of e.value)if(x=C,(h=I).left<x.left+x.width&&h.left+h.width>x.left&&h.top<x.top+x.height&&h.height+h.top>x.top)return void k();var h,x;v((I,Pe,K)=>{var S,E;K.active=(S=C,(E=K).x>=S.left&&E.x<S.right&&E.y>=S.top&&E.y<S.bottom)})})(t,f)},[l(m,{icon:"ep-plus"})],46,O))),128))]))),128))]),(n(!0),p(U,null,$(o(e),(d,t)=>(n(),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:k},[o(z)===t?(n(),p("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,G)):Q("",!0),T(" "+oe(`${d.width}\xD7${d.height}`),1)],44,q))),128))])])}}}),[["__scopeId","data-v-d5b18453"],["__file","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/components/MagicCubeEditor/index.vue"]]),Y=X(W({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=(w,r)=>{c.value=r};return(w,r)=>{const z=fe,R=F,k=de,v=se,i=ne,a=ie,m=_e,d=ee;return n(),ue(d,{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(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"]),(n(!0),p(U,null,$(o(e).list,(t,b)=>(n(),p(U,{key:b},[o(c)===b?(n(),p(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)):Q("",!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","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/components/DiyEditor/components/mobile/MagicCube/property.vue"]])});export{Ae as __tla,Y as default};