import{d as P,r as n,a4 as v,a as y,l as r,u as N,c as k,o as S,w as p,j as s,W as V,i as I,Z as B,B as C,X as F,v as x}from"./index-9PRMimni.js";import{B as w}from"./BasicForm-dL_oCSPM.js";import{u as J}from"./useVerificate-D9xvUzmi.js";import"./Render.vue_vue_type_script_lang-DKUYY0Zw.js";import"./SingleImageUpload-CNx4b9eC.js";import"./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";import"./componentSetting-DVhNDBTO.js";import"./ImageUpload-DUsnro3W.js";import"./vuedraggable.umd-Co2xEC3p.js";import"./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";import"./tabsView-BXskTdVh.js";import"./BasicForm.vue_vue_type_style_index_0_scoped_b9e995ec_lang-CEvcLwxD.js";import"./propTypes-CebMRUpe.js";import"./BasicSelect-C_uwzMkE.js";import"./BasicSelect.vue_vue_type_style_index_0_scoped_772d51cc_lang-Brp6PjEU.js";import"./dictionary-BRse4lkf.js";import"./index-DkvzUEqh.js";import"./index-kKnqLkWM.js";import"./AutoComplete-Dv1Bqed4.js";import"./TreeSelect-BZh2DeCh.js";const M={class:"BasicForm"},R=P({__name:"group",setup(H){const t=n(),a=n(!0),{isMobile:u}=J(),c=v(()=>a.value),i=[{key:"basic",title:"基本信息",cardProps:{},cardSlots:{headerExtra:()=>B(C,{type:"tertiary",strong:!0,secondary:!0,onClick:()=>{d()}},{default:()=>"设置Form值"})},columns:[{field:"group_name",component:"NInput",label:"姓名",labelMessage:"这是一个提示",componentProps:{placeholder:"请输入姓名"},rules:[{required:!0,message:"请输入姓名",trigger:["blur"]}]},{field:"group_mobile",component:"NInput",label:"手机",componentProps:({formAction:e})=>({placeholder:"请输入手机号码",onInput:o=>{e.updateGroupSchema("","",""),e.setFieldsValue({group_name:o})}})},{field:"group_point",component:"NInput",label:"个人特长",componentProps:{type:"textarea",placeholder:"请输入个人特长"}}]},{key:"major",title:"专业信息",columns:[{field:"group_industry",component:"NInput",label:"岗位",componentProps:{placeholder:"请输入岗位"}},{field:"group_technical",component:"NInput",label:"技能",componentProps:{placeholder:"请输入岗位",option:[{label:"Java",value:"Java"},{label:"PHP",value:"PHP"},{label:"C++",value:"C++"},{label:"C#",value:"C#"},{label:"Python",value:"Python"}]}},{field:"group_capacity",component:"NRate",label:"能力",defaultValue:2,componentProps:{}}]}],m=y([{field:"id",defaultValue:128,hidden:!0},{field:"identity",defaultValue:"我是一个隐藏字段内容",hidden:!0},{field:"info.name",component:"NInput",label:"姓名",labelMessage:"这是一个提示",componentProps:{placeholder:"请输入姓名",onInput:e=>{console.log(e)}},rules:[{required:!0,message:"请输入姓名",trigger:["blur"]}]},{field:"mobile",component:"NInputNumber",label:"手机",componentProps:{placeholder:"请输入手机号码",showButton:!1,onInput:e=>{console.log(e)}},rules:[{key:"mobile",required:!0,validator:u,trigger:["input","blur"]}]},{field:"type",component:"NSelect",label:"类型",componentProps:{placeholder:"请选择类型",options:[{label:"舒适性",value:1},{label:"经济性",value:2}],onUpdateValue:e=>{console.log(e)}}},{field:"makeDate",component:"NDatePicker",label:"预约时间",defaultValue:118313526e4,componentProps:{type:"date",onUpdateValue:e=>{console.log(e)}},hidden:({model:e})=>!e.type,rules:[{required:!0,type:"number",message:"请选择预约时间",trigger:["change"]}]},{field:"makeTime",component:"NTimePicker",label:"停留时间",componentProps:{onUpdateValue:e=>{console.log(e)}}},{field:"makeProject",component:"NCheckbox",label:"预约项目",componentProps:{placeholder:"请选择预约项目",options:[{label:"种牙",value:1},{label:"补牙",value:2},{label:"根管",value:3}],onUpdateValue:e=>{a.value=e.includes(3),t.value.setSchema(g())}}},{field:"makeSource",component:"NRadioGroup",label:"来源",hidden:c.value,componentProps:{options:[{label:"网上",value:1},{label:"门店",value:2}],onUpdateValue:e=>{console.log(e)}}}]);function d(){console.log(t.value),t.value.setFieldsValue({group_name:"NaiveAdmin",group_mobile:"18879988888",group_point:"JavaScript、Java、Python、PHP、C++",group_industry:"大PHP",group_technical:"PHP",group_capacity:5})}function g(){const e=r(m);return e.forEach(o=>{o.field==="makeSource"&&(o.hidden=!a.value)}),e}const l=N();function f(e){l.success(JSON.stringify(e))}function b(e){l.success(JSON.stringify(e))}return(e,o)=>{const _=V,h=F;return S(),k(h,{title:"分组表单",content:"试想一下，产品设计了一堆表单给你，刚好需要你把这些表单分组，这时候这个组件就排上用场了",showFooter:""},{default:p(()=>[s(_,{bordered:!1,class:"mt-3 proCard"},{default:p(()=>[I("div",M,[s(r(w),{ref_key:"basicFormRef",ref:t,submitButtonText:"提交预约",layout:"horizontal",group:i,gridProps:{cols:1},onSubmit:f,onReset:b},null,512)])]),_:1})]),_:1})}}}),te=x(R,[["__scopeId","data-v-3edc09de"]]);export{te as default};
