"use strict";(self["webpackChunkscui"]=self["webpackChunkscui"]||[]).push([[2944],{41551:function(e,l,a){a.r(l),a.d(l,{default:function(){return n}});var t=a(66252);const o=(0,t.Uk)("保存"),u=(0,t.Uk)("重置");function m(e,l,a,m,d,r){const p=(0,t.up)("el-alert"),n=(0,t.up)("el-input"),i=(0,t.up)("el-form-item"),c=(0,t.up)("el-time-select"),s=(0,t.up)("el-table-column"),w=(0,t.up)("el-option"),f=(0,t.up)("el-select"),V=(0,t.up)("el-checkbox"),h=(0,t.up)("el-switch"),b=(0,t.up)("sc-form-table"),W=(0,t.up)("el-button"),k=(0,t.up)("el-form"),v=(0,t.up)("el-card"),U=(0,t.up)("el-main");return(0,t.wg)(),(0,t.j4)(U,null,{default:(0,t.w5)((()=>[(0,t.Wm)(p,{title:"来自AVUE的灵感, 业务会有表单里含有对象数组的可能, 进行封装后进行增删改操作, 并且支持联动form表单的禁用属性",type:"success",style:{"margin-bottom":"20px"}}),(0,t.Wm)(v,{shadow:"never"},{default:(0,t.w5)((()=>[(0,t.Wm)(k,{ref:"ruleForm",model:d.form,rules:d.rules,"label-width":"100px"},{default:(0,t.w5)((()=>[(0,t.Wm)(i,{label:"标题",prop:"title"},{default:(0,t.w5)((()=>[(0,t.Wm)(n,{modelValue:d.form.title,"onUpdate:modelValue":l[0]||(l[0]=e=>d.form.title=e)},null,8,["modelValue"])])),_:1}),(0,t.Wm)(i,{label:"表格",prop:"list"},{default:(0,t.w5)((()=>[(0,t.Wm)(b,{modelValue:d.form.list,"onUpdate:modelValue":l[1]||(l[1]=e=>d.form.list=e),addTemplate:d.addTemplate,"drag-sort":"",placeholder:"暂无数据"},{default:(0,t.w5)((()=>[(0,t.Wm)(s,{prop:"time",label:"时间",width:"180"},{default:(0,t.w5)((e=>[(0,t.Wm)(c,{modelValue:e.row.time,"onUpdate:modelValue":l=>e.row.time=l},null,8,["modelValue","onUpdate:modelValue"])])),_:1}),(0,t.Wm)(s,{prop:"type",label:"类型",width:"180"},{default:(0,t.w5)((e=>[(0,t.Wm)(f,{modelValue:e.row.type,"onUpdate:modelValue":l=>e.row.type=l,placeholder:"请选择"},{default:(0,t.w5)((()=>[((0,t.wg)(!0),(0,t.iD)(t.HY,null,(0,t.Ko)(d.typeDic,(e=>((0,t.wg)(),(0,t.j4)(w,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:1}),(0,t.Wm)(s,{prop:"val",label:"数量","min-width":"180"},{default:(0,t.w5)((e=>[(0,t.Wm)(n,{modelValue:e.row.val,"onUpdate:modelValue":l=>e.row.val=l,placeholder:"请输入内容"},null,8,["modelValue","onUpdate:modelValue"])])),_:1}),(0,t.Wm)(s,{prop:"open",label:"checked",width:"85",align:"center"},{default:(0,t.w5)((e=>[(0,t.Wm)(V,{modelValue:e.row.checked,"onUpdate:modelValue":l=>e.row.checked=l},null,8,["modelValue","onUpdate:modelValue"])])),_:1}),(0,t.Wm)(s,{prop:"open",label:"开关",width:"80",align:"center"},{default:(0,t.w5)((e=>[(0,t.Wm)(h,{modelValue:e.row.open,"onUpdate:modelValue":l=>e.row.open=l},null,8,["modelValue","onUpdate:modelValue"])])),_:1})])),_:1},8,["modelValue","addTemplate"])])),_:1}),(0,t.Wm)(i,null,{default:(0,t.w5)((()=>[(0,t.Wm)(W,{type:"primary",onClick:r.submitForm},{default:(0,t.w5)((()=>[o])),_:1},8,["onClick"]),(0,t.Wm)(W,{onClick:r.resetForm},{default:(0,t.w5)((()=>[u])),_:1},8,["onClick"])])),_:1})])),_:1},8,["model","rules"])])),_:1})])),_:1})}var d={name:"formtable",data(){return{addTemplate:{time:"",type:"",val:"",open:!0,checked:!1},form:{title:"标题",list:[{time:"09:00",type:"1",val:"100",open:!0,checked:!0},{time:"10:00",type:"0",val:"50",open:!1,checked:!0}]},typeDic:[{label:"全局",value:"0"},{label:"局部",value:"1"}],rules:{title:[{required:!0,message:"请上传",trigger:"blur"}]}}},methods:{submitForm(){this.$refs.ruleForm.validate((e=>{if(!e)return!1;alert("请看控制台输出"),console.log(this.form)}))},resetForm(){this.$refs.ruleForm.resetFields()}}},r=a(83744);const p=(0,r.Z)(d,[["render",m]]);var n=p}}]);