import{t as C,C as D,D as B,w as y,I as U,F as N}from"./element-plus.9cae3cb1.js";import{_ as $}from"./index.ca7c40ee.js";import{f as p,b as I}from"./index.60ed7c6d.js";import{_ as j}from"./picker.cc45538c.js";import{_ as O}from"./picker.cbc3f1d2.js";import{D as R}from"./vuedraggable.7c3813d2.js";import{d as S,o as m,c as f,V as e,M as l,u as z,L,a,S as M,R as T}from"./@vue.96c135a1.js";const q=a("div",{class:"flex items-end mb-4"},[a("div",{class:"text-base text-[#101010] font-medium"},"\u83DC\u5355"),a("div",{class:"text-xs text-tx-secondary ml-2"}," \u6700\u591A\u6DFB\u52A05\u5F20\uFF0C\u5EFA\u8BAE\u56FE\u7247\u5C3A\u5BF8\uFF1A750px*200px ")],-1),G={class:"bg-fill-light flex items-center w-full p-4 mt-4"},H={class:"ml-3 flex-1"},J={class:"flex-1 flex items-center"},K={class:"drag-move cursor-move ml-auto"},P={key:0,class:"mt-4"},_=5,oe=S({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},setup(s){const c=s,F=()=>{var n;((n=c.content.data)==null?void 0:n.length)<_?c.content.data.push({image:"",name:"",link:{}}):p.msgError(`\u6700\u591A\u6DFB\u52A0${_}\u5F20\u56FE\u7247`)},V=n=>{var u;if(((u=c.content.data)==null?void 0:u.length)<=1)return p.msgError("\u6700\u5C11\u4FDD\u7559\u4E00\u5F20\u56FE\u7247");c.content.data.splice(n,1)};return(n,u)=>{const x=O,h=D,d=B,g=j,E=C,v=I,b=$,k=y,w=U,A=N;return m(),f("div",null,[e(A,{"label-width":"70px"},{default:l(()=>[e(w,{shadow:"never",class:"!border-none flex mt-2"},{default:l(()=>{var i;return[q,e(z(R),{class:"draggable",modelValue:s.content.data,"onUpdate:modelValue":u[0]||(u[0]=t=>s.content.data=t),animation:"300",handle:".drag-move"},{item:l(({element:t,index:r})=>[(m(),L(b,{key:r,onClose:o=>V(r),class:"w-[467px]"},{default:l(()=>[a("div",G,[e(x,{modelValue:t.image,"onUpdate:modelValue":o=>t.image=o,"upload-class":"bg-body","exclude-domain":""},null,8,["modelValue","onUpdate:modelValue"]),a("div",H,[e(d,{label:"\u56FE\u7247\u540D\u79F0"},{default:l(()=>[e(h,{modelValue:t.name,"onUpdate:modelValue":o=>t.name=o,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e(d,{class:"mt-[18px]",label:"\u56FE\u7247\u94FE\u63A5"},{default:l(()=>[e(g,{modelValue:t.link,"onUpdate:modelValue":o=>t.link=o},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),e(d,{label:"\u662F\u5426\u663E\u793A",class:"mt-[18px]"},{default:l(()=>[a("div",J,[e(E,{modelValue:t.is_show,"onUpdate:modelValue":o=>t.is_show=o,"active-value":"1","inactive-value":"0"},null,8,["modelValue","onUpdate:modelValue"]),a("div",K,[e(v,{name:"el-icon-Rank",size:"18"})])])]),_:2},1024)])])]),_:2},1032,["onClose"]))]),_:1},8,["modelValue"]),((i=s.content.data)==null?void 0:i.length)<_?(m(),f("div",P,[e(k,{class:"w-full",type:"primary",onClick:F},{default:l(()=>[M("\u6DFB\u52A0\u56FE\u7247")]),_:1})])):T("",!0)]}),_:1})]),_:1})])}}});export{oe as _};
