import{d as C,a as f,e as i,o as d,c as p,n,g as o,h as a,w as _,l as U,V as w,p as E,_ as b}from"./index-17740f03-1778929502341v=1.0.0.js";const g={class:"plan-container"},h={class:"else-plan mb20"},k={class:"flex mr10"},N={class:"flex flex-s ml20"},A={key:0,class:"flex flex-s ml10"},P=C({__name:"UploadFile",props:{value:Object},emits:["update:value"],setup(c,{emit:r}){const s=c,m=r,v=l=>{s.value.file_url=l[0].url,s.value.file_name=l[0].name},F=f(()=>s.value.file_url&&s.value.file_name),t=f({get(){return x(s.value)},set(l){m("update:value",l)}}),x=l=>{let e=l;return e.fileList=[],e.file_url&&e.file_name&&(e.fileList=[{url:e.file_name,name:e.file_name,file_path:e.file_url,file_type_id:e.file_type_id}]),e},B=()=>{t.value.file_url="",t.value.file_name=""};return(l,e)=>{const D=i("el-input"),L=i("el-button"),V=i("Delete"),y=i("el-icon");return d(),p("div",g,[n("div",h,[n("div",k,[e[2]||(e[2]=n("span",{class:"title"},"\u6587\u4EF6\u540D\u79F0\uFF1A",-1)),o(D,{modelValue:a(t).file_name,"onUpdate:modelValue":e[0]||(e[0]=u=>a(t).file_name=u),rows:1,class:"flex1",type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u65B9\u6848\u540D\u79F0"},null,8,["modelValue"])]),n("div",N,[e[4]||(e[4]=n("span",{calss:"title"},"\u6587\u4EF6\u9644\u4EF6\uFF1A",-1)),o(w,{fileList:a(t).fileList,"onUpdate:fileList":e[1]||(e[1]=u=>a(t).fileList=u),onUploadFile:v,limit:1,showFileList:!1},{default:_(()=>[o(L,null,{default:_(()=>e[3]||(e[3]=[U("\u70B9\u51FB\u4E0A\u4F20")])),_:1})]),_:1},8,["fileList"]),a(F)?(d(),p("div",A,[o(y,{onClick:B,class:"icon"},{default:_(()=>[o(V)]),_:1})])):E("v-if",!0)])])])}}});const I=b(P,[["__scopeId","data-v-96f3c412"]]);export{I as default};
