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