import{l as _,_ as $}from"./index-996f931c-1782111760424v=1.0.0.js";import{z as q,p as D}from"./eleVendor-99a45232-1782111760424v=1.0.0.js";import{m as E,f as I,ai as i,p as t,M as n,O as e,u as c,U as a,t as S,R as r,q as k,F as x,a8 as h,Q as u,S as z,T as L}from"./vendor-7f807b9d-1782111760424v=1.0.0.js";const M={class:"empty_box"},Q=E({__name:"CustomForm",props:{value:{default:[]},type:{default:"add"}},emits:["update:visible","update:value","submit","update:loading","edit"],setup(g,{emit:C}){const T=g,m=C,s=I({get:()=>T.value,set:l=>{m("update:value",l)}}),F=l=>{switch(l){case"time_second":return"date-picker";case"number":return"input-number";default:return l}},V=l=>{s.value.splice(l,1)},w=l=>{m("edit",l)};return(l,U)=>{const B=i("el-empty"),f=i("el-form-item"),y=i("FormRow"),v=i("el-select"),O=i("el-option"),b=i("el-button"),N=i("el-form");return t(),n(N,{ref:"formRef","label-width":"160px"},{default:e(()=>[c(s).length===0?(t(),n(y,{key:0},{default:e(()=>[a(_,null,{default:e(()=>[a(f,{label:"",prop:"fieldName"},{default:e(()=>[S("div",M,[a(B,{description:"\u6682\u65E0\u5185\u5BB9"})])]),_:1})]),_:1})]),_:1})):r("v-if",!0),(t(!0),k(x,null,h(c(s),(o,p)=>(t(),n(y,{key:p},{default:e(()=>[a(_,null,{default:e(()=>[a(f,{label:o.fieldName+":",prop:o.fieldValue,required:Boolean(o.isFill)},{default:e(()=>[["date","input","time_second","number"].indexOf(o.fieldType)!==-1?(t(),n(u(`el-${F(o.fieldType)}`),{key:0,type:"input",placeholder:o.prompt,disabled:!0},null,8,["placeholder"])):r("v-if",!0),["radio"].indexOf(o.fieldType)!==-1?(t(),n(u("el-radio-group"),{key:1,disabled:!0},{default:e(()=>[a(v,{style:{width:"130px"},disabled:!0})]),_:1})):r("v-if",!0),["checkbox"].indexOf(o.fieldType)!==-1?(t(),n(u("el-checkbox-group"),{key:2,disabled:!0},{default:e(()=>[a(v,{style:{width:"130px"},disabled:!0})]),_:1})):r("v-if",!0),r(` <component v-if="['radio'].indexOf(item.fieldType) !== -1" :is="\`el-radio-group\`" :disabled="true">\r
						<el-radio v-for="(c_item, c_index) in item.selectValues" :key="c_index" :value="c_item"> {{ c_item }}</el-radio>\r
					</component>\r
					<component v-if="['checkbox'].indexOf(item.fieldType) !== -1" :is="\`el-checkbox-group\`" :disabled="true">\r
						<el-checkbox v-for="(c_item, c_index) in item.selectValues" :key="c_index" :name="c_item" :value="c_item">\r
							{{ c_item }}\r
						</el-checkbox>\r
					</component> `),["select"].indexOf(o.fieldType)!==-1?(t(),n(u("el-select"),{key:3,disabled:!0},{default:e(()=>[(t(!0),k(x,null,h(o.selectValues,(d,R)=>(t(),n(O,{key:R,value:d},{default:e(()=>[z(L(d),1)]),_:2},1032,["value"]))),128))]),_:2},1024)):r("v-if",!0)]),_:2},1032,["label","prop","required"])]),_:2},1024),l.type!="detail"?(t(),n(_,{key:0},{default:e(()=>[a(b,{icon:c(q),onClick:d=>w(p)},null,8,["icon","onClick"]),a(b,{icon:c(D),type:"danger",onClick:d=>V(p)},null,8,["icon","onClick"])]),_:2},1024)):r("v-if",!0)]),_:2},1024))),128))]),_:1},512)}}});const H=$(Q,[["__scopeId","data-v-23c28a78"]]);export{H as default};
