import{d as N,p as b,f as A,i as u,a as d,c as r,F as P,q as U,j as l,v as c,k as s,e as _,z as E,m as f,l as M,_ as O}from"./index-deffec86.js";const j={class:"plan-container"},J={class:"item"},S={class:"flex"},q={class:"item"},w={class:"flex"},z={class:"flex flex-s"},I=N({__name:"MediaData",props:{value:Object},emits:["update:value","update:loading","cancel","submit"],setup(v,{expose:F,emit:x}){b({xs:20,sm:20,md:18,lg:16,xl:12});let V=v;const C=x,o=A({get(){return B(V.value)},set(t){C("update:value",k(t))}}),B=t=>t,k=t=>JSON.parse(JSON.stringify(t)),y=()=>{o.value.push({title:"",url:""})},D=t=>{o.value.splice(t,1)};return F({elsePlan:o}),(t,e)=>{const p=u("el-input"),g=u("Delete"),i=u("el-icon"),h=u("Plus");return d(),r("div",j,[(d(!0),r(P,null,U(_(o),(a,m)=>(d(),r("div",{key:m,class:"else-plan mb20"},[l("div",J,[l("div",S,[e[0]||(e[0]=l("span",null,"\u6807\u9898\uFF1A",-1)),e[1]||(e[1]=c()),s(p,{modelValue:a.title,"onUpdate:modelValue":n=>a.title=n,placeholder:"\u8BF7\u8F93\u5165\u65B9\u6848\u540D\u79F0"},null,8,["modelValue","onUpdate:modelValue"])])]),l("div",q,[l("div",w,[e[2]||(e[2]=l("span",null,"\u94FE\u63A5\uFF1A",-1)),e[3]||(e[3]=c()),s(p,{modelValue:a.url,"onUpdate:modelValue":n=>a.url=n,placeholder:"\u8BF7\u8F93\u5165\u65B9\u6848\u540D\u79F0"},null,8,["modelValue","onUpdate:modelValue"])])]),l("div",z,[_(o).length>1?(d(),E(i,{key:0,onClick:n=>D(m),class:"icon"},{default:f(()=>[s(g)]),_:2},1032,["onClick"])):M("v-if",!0)])]))),128)),l("div",{class:"add-button",onClick:y},[s(i,null,{default:f(()=>[s(h)]),_:1}),e[4]||(e[4]=c(" \u65B0\u589E "))])])}}});const T=O(I,[["__scopeId","data-v-90fac4aa"]]);export{T as default};
