import{c as e,r as a,o as r,n as s,v as l,x as m,e as u,B as o,y as n,T as t,ab as i,a9 as d}from"./base-lib.js?v=1761009159";import{gE as p,I as f,b}from"./utils-lib.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const g={class:"w-[38rem] px-[5rem] py-[3rem]"},c=e({__name:"index",emits:["resize"],setup(e,{expose:c,emit:_}){const v=b(),V=_,w=a(null),x=r({username1:"",username2:""}),j=r({username1:[{required:!0,message:"请输入用户名",trigger:"blur"},{min:4,message:"用户名长度必须大于3位",trigger:"blur"}],username2:[{validator:(e,a,r)=>{""===a?r(new Error("请再次输入用户名")):a!==x.username1?r(new Error("两次输入的用户名不一致")):r()},trigger:"blur"}]});return s(()=>{V("resize")}),c({onConfirm:()=>{var e;null==(e=w.value)||e.validate(async e=>{if(!e)return;const a=await p(x);v.request(a),a.status&&f("/login?dologin=True")})}}),(e,a)=>{const r=t,s=i,p=d;return l(),m("div",g,[u(p,{ref_key:"formRef",ref:w,size:"small","label-width":"4.6rem",autocomplete:"off",model:n(x),rules:n(j)},{default:o(()=>[u(s,{label:"用户名",prop:"username1"},{default:o(()=>[u(r,{modelValue:n(x).username1,"onUpdate:modelValue":a[0]||(a[0]=e=>n(x).username1=e)},null,8,["modelValue"])]),_:1}),u(s,{class:"!mb-0",label:"重复",prop:"username2"},{default:o(()=>[u(r,{modelValue:n(x).username2,"onUpdate:modelValue":a[1]||(a[1]=e=>n(x).username2=e)},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])}}});export{c as default};
