import{b as w}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{y as O,c as E,r as F,m as R,al as m,z as M,I as P,J as u,B as y,R as l,a8 as i,a9 as p,u as t,O as _}from"./vendor-866bb149-1782572373740v=1.0.0.js";const j={coverUrl:[],liveName:[{max:500,message:"\u6700\u591A 500 \u4E2A\u5B57\u7B26",trigger:"blur"}],liveUrl:[{max:1e3,message:"\u6700\u591A 1000 \u4E2A\u5B57\u7B26",trigger:"blur"}],liveStartTime:[],eventLiveStatus:[],createTime:[]},z={class:"pt20 mt30"},L=O({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(b,{emit:A}){w();let g=b;const f=A,o=E({get(){return U(g.value)},set(a){f("update:value",a)}}),V=E({get(){return g.loading},set(a){f("update:loading",a)}}),c=F();F({xs:24,sm:22,md:20,lg:14,xl:13});const s=F({xs:24,sm:24,md:12,lg:12,xl:12});F({xs:24,sm:22,md:18,lg:16,xl:8});const S=a=>{o.value.liveStartTimeStart=a[0],o.value.liveStartTimeEnd=a[1]},U=a=>a,x=()=>JSON.parse(JSON.stringify(o.value)),T=a=>{a.validate(async(e,v)=>{if(e){let r=x();f("submit",r)}else{const r=Object.keys(v)[0];a.scrollToField(r)}})},k=()=>{f("cancel")};return R(()=>{}),(a,e)=>{const v=m("ImgOne"),r=m("el-form-item"),d=m("PaCol"),D=m("el-input"),B=m("el-date-picker"),N=m("PaRow"),C=m("el-button"),Y=m("el-form");return M(),P(Y,{model:t(o),ref_key:"formRef",ref:c,rules:t(j),"label-width":"160px"},{default:u(()=>[e[9]||(e[9]=y("div",{class:"divider mb30"},"\u57FA\u7840\u4FE1\u606F",-1)),l(N,null,{default:u(()=>[l(d,i(p(t(s))),{default:u(()=>[l(r,{label:"\u76F4\u64AD\u5C01\u9762",prop:"coverUrl"},{default:u(()=>[l(v,{"image-url":t(o).coverUrl,"onUpdate:imageUrl":e[0]||(e[0]=n=>t(o).coverUrl=n),fileSize:2},{tip:u(()=>e[6]||(e[6]=[_(" \u53EA\u80FD\u4E0A\u4F20jpg/png\u6587\u4EF6\uFF0C\u4E14\u4E0D\u8D85\u8FC72MB ",-1)])),_:1},8,["image-url"])]),_:1})]),_:1},16),l(d,i(p(t(s))),{default:u(()=>[l(r,{label:"\u76F4\u64AD\u540D\u79F0",prop:"liveName"},{default:u(()=>[l(D,{modelValue:t(o).liveName,"onUpdate:modelValue":e[1]||(e[1]=n=>t(o).liveName=n),placeholder:"\u8BF7\u8F93\u5165\u76F4\u64AD\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1},16),l(d,i(p(t(s))),{default:u(()=>[l(r,{label:"\u76F4\u64AD\u94FE\u63A5",prop:"liveUrl"},{default:u(()=>[l(D,{modelValue:t(o).liveUrl,"onUpdate:modelValue":e[2]||(e[2]=n=>t(o).liveUrl=n),placeholder:"\u8BF7\u8F93\u5165\u76F4\u64AD\u94FE\u63A5"},null,8,["modelValue"])]),_:1})]),_:1},16),l(d,i(p(t(s))),{default:u(()=>[l(r,{label:"\u76F4\u64AD\u65F6\u95F4",prop:"liveStartTime"},{default:u(()=>[l(B,{modelValue:t(o).liveStartTime,"onUpdate:modelValue":e[3]||(e[3]=n=>t(o).liveStartTime=n),type:"daterange","value-format":"YYYY-MM-DD","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F",style:{width:"100%"},onChange:S},null,8,["modelValue"])]),_:1})]),_:1},16),l(d,i(p(t(s))),{default:u(()=>[l(r,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:u(()=>[l(B,{modelValue:t(o).createTime,"onUpdate:modelValue":e[4]||(e[4]=n=>t(o).createTime=n),type:"date","value-format":"YYYY-MM-DD",placeholder:"\u8BF7\u9009\u62E9\u521B\u5EFA\u65F6\u95F4",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1},16)]),_:1}),l(r,null,{default:u(()=>[y("div",z,[l(C,{onClick:k},{default:u(()=>e[7]||(e[7]=[_("\u8FD4\u56DE",-1)])),_:1,__:[7]}),l(C,{type:"primary",loading:t(V),onClick:e[5]||(e[5]=n=>T(t(c)))},{default:u(()=>e[8]||(e[8]=[_("\u4FDD\u5B58",-1)])),_:1,__:[8]},8,["loading"])])]),_:1})]),_:1,__:[9]},8,["model","rules"])}}});export{L as _};
