Demo03GradeForm-2b99c39e.js 1.7 KB

1
  1. import{d as b,r as u,f as y,aP as V,C as w,a as l,o as x,l as q,w as o,i as r,U as D,H as I,K as U,N as k,_ as F,__tla as G}from"./index-afaf388d.js";import{b as H,__tla as P}from"./index-2b64c030.js";let _,R=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return P}catch{}})()]).then(async()=>{_=F(b({__name:"Demo03GradeForm",props:{studentId:{type:null,required:!0}},setup(c,{expose:p}){const f=c,t=u(!1),e=u([]),v=y({studentId:[{required:!0,message:"\u5B66\u751F\u7F16\u53F7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],name:[{required:!0,message:"\u540D\u5B57\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],teacher:[{required:!0,message:"\u73ED\u4E3B\u4EFB\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),n=u();return V(()=>f.studentId,async s=>{if(e.value={id:void 0,studentId:void 0,name:void 0,teacher:void 0},s)try{t.value=!0;const a=await H(s);if(!a)return;e.value=a}finally{t.value=!1}},{immediate:!0}),p({validate:()=>n.value.validate(),getData:()=>e.value}),(s,a)=>{const m=D,i=I,g=U,h=k;return w((x(),q(g,{ref_key:"formRef",ref:n,model:l(e),rules:l(v),"label-width":"100px"},{default:o(()=>[r(i,{label:"\u540D\u5B57",prop:"name"},{default:o(()=>[r(m,{modelValue:l(e).name,"onUpdate:modelValue":a[0]||(a[0]=d=>l(e).name=d),placeholder:"\u8BF7\u8F93\u5165\u540D\u5B57"},null,8,["modelValue"])]),_:1}),r(i,{label:"\u73ED\u4E3B\u4EFB",prop:"teacher"},{default:o(()=>[r(m,{modelValue:l(e).teacher,"onUpdate:modelValue":a[1]||(a[1]=d=>l(e).teacher=d),placeholder:"\u8BF7\u8F93\u5165\u73ED\u4E3B\u4EFB"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[h,l(t)]])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/demo/demo03/inner/components/Demo03GradeForm.vue"]])});export{R as __tla,_ as default};