import{G as D,H as U,D as v,C as w,w as N,F as $}from"./element-plus.fa1aa32c.js";import{_ as j}from"./index.a5935337.js";import{_ as G}from"./picker.a8e8312e.js";import{_ as I}from"./picker.9777ec45.js";import{f as b}from"./index.0abf9e5c.js";import{D as O}from"./vuedraggable.5917840d.js";import{d as R,o as n,c as S,V as l,M as t,L as s,S as _,a as r,u as T,T as p}from"./@vue.cab01781.js";const H=p("\u5F00\u542F"),L=p("\u505C\u7528"),M={class:"flex-1"},q=r("div",{class:"form-tips"},"\u6700\u591A\u6DFB\u52A05\u5F20\uFF0C\u5EFA\u8BAE\u56FE\u7247\u5C3A\u5BF8\uFF1A750px*340px",-1),z={class:"bg-fill-light flex items-center w-full p-4 mt-4 cursor-move"},J={class:"ml-3 flex-1"},K=p("\u6DFB\u52A0\u56FE\u7247"),te=R({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})},type:{type:String,default:"mobile"}},setup(o){const c=o,i=5,g=()=>{var d;((d=c.content.data)==null?void 0:d.length)<i?c.content.data.push({image:"",name:"",link:{}}):b.msgError(`\u6700\u591A\u6DFB\u52A0${i}\u5F20\u56FE\u7247`)},k=d=>{var u;if(((u=c.content.data)==null?void 0:u.length)<=1)return b.msgError("\u6700\u5C11\u4FDD\u7559\u4E00\u5F20\u56FE\u7247");c.content.data.splice(d,1)};return(d,u)=>{const f=D,h=U,m=v,y=I,F=w,B=G,x=j,A=N,C=$;return n(),S("div",null,[l(C,{"label-width":"70px"},{default:t(()=>{var V;return[o.type=="mobile"?(n(),s(m,{key:0,label:"\u662F\u5426\u542F\u7528"},{default:t(()=>[l(h,{modelValue:o.content.enabled,"onUpdate:modelValue":u[0]||(u[0]=e=>o.content.enabled=e)},{default:t(()=>[l(f,{label:1},{default:t(()=>[H]),_:1}),l(f,{label:0},{default:t(()=>[L]),_:1})]),_:1},8,["modelValue"])]),_:1})):_("",!0),l(m,{label:"\u56FE\u7247\u8BBE\u7F6E"},{default:t(()=>[r("div",M,[q,l(T(O),{class:"draggable",modelValue:o.content.data,"onUpdate:modelValue":u[1]||(u[1]=e=>o.content.data=e),animation:"300"},{item:t(({element:e,index:E})=>[(n(),s(x,{key:E,onClose:a=>k(E),class:"max-w-[400px]"},{default:t(()=>[r("div",z,[l(y,{modelValue:e.image,"onUpdate:modelValue":a=>e.image=a,"upload-class":"bg-body","exclude-domain":""},null,8,["modelValue","onUpdate:modelValue"]),r("div",J,[l(m,{label:"\u56FE\u7247\u540D\u79F0"},{default:t(()=>[l(F,{modelValue:e.name,"onUpdate:modelValue":a=>e.name=a,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),l(m,{class:"mt-[18px]",label:"\u56FE\u7247\u94FE\u63A5"},{default:t(()=>[o.type=="mobile"?(n(),s(B,{key:0,modelValue:e.link,"onUpdate:modelValue":a=>e.link=a},null,8,["modelValue","onUpdate:modelValue"])):_("",!0),o.type=="pc"?(n(),s(F,{key:1,placeholder:"\u8BF7\u8F93\u5165\u94FE\u63A5",modelValue:e.link.path,"onUpdate:modelValue":a=>e.link.path=a},null,8,["modelValue","onUpdate:modelValue"])):_("",!0)]),_:2},1024)])])]),_:2},1032,["onClose"]))]),_:1},8,["modelValue"])])]),_:1}),((V=o.content.data)==null?void 0:V.length)<i?(n(),s(m,{key:1},{default:t(()=>[l(A,{type:"primary",onClick:g},{default:t(()=>[K]),_:1})]),_:1})):_("",!0)]}),_:1})])}}});export{te as _};
