update.f4dc0cfb.js 2.9 KB

1
  1. import{_ as F,d as b,m as v,a8 as k,r as i,o as g,A as D,x as l,h as e,u as a,D as f,b as R,H as _,G as U,R as A}from"./index.56449854.js";import{M as n}from"./motion.3924c159.js";import{u as w,a as h}from"./verifyCode.c91bd0d9.js";import{E as P}from"./index.4bd736a1.js";const N={class:"w-full flex justify-between"},T=b({__name:"update",setup(z){const d=v(!1),u=k({phone:"",verifyCode:"",password:"",repeatPassword:""}),m=v(),{isDisabled:C,text:y}=w(),E=[{validator:(p,o,r)=>{o===""?r(new Error("\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801")):u.password!==o?r(new Error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4!")):r()},trigger:"blur"}],x=async p=>{d.value=!0,p&&await p.validate((o,r)=>{if(o)setTimeout(()=>{P.success("\u4FEE\u6539\u5BC6\u7801\u6210\u529F"),d.value=!1},2e3);else return d.value=!1,r})};function B(){w().end(),A().SET_CURRENTPAGE(0)}return(p,o)=>{const r=i("el-input"),t=i("el-form-item"),c=i("el-button"),V=i("el-form");return g(),D(V,{ref_key:"ruleFormRef",ref:m,model:u,rules:a(h),size:"large"},{default:l(()=>[e(a(n),null,{default:l(()=>[e(t,{prop:"phone"},{default:l(()=>[e(r,{clearable:"",modelValue:u.phone,"onUpdate:modelValue":o[0]||(o[0]=s=>u.phone=s),placeholder:"\u624B\u673A\u53F7\u7801","prefix-icon":a(f)("iphone")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),e(a(n),{delay:100},{default:l(()=>[e(t,{prop:"verifyCode"},{default:l(()=>[R("div",N,[e(r,{clearable:"",modelValue:u.verifyCode,"onUpdate:modelValue":o[1]||(o[1]=s=>u.verifyCode=s),placeholder:"\u77ED\u4FE1\u9A8C\u8BC1\u7801","prefix-icon":a(f)("ri:shield-keyhole-line",{online:!0})},null,8,["modelValue","prefix-icon"]),e(c,{disabled:a(C),class:"ml-2",onClick:o[2]||(o[2]=s=>a(w)().start(m.value,"phone"))},{default:l(()=>[_(U(a(y)),1)]),_:1},8,["disabled"])])]),_:1})]),_:1}),e(a(n),{delay:150},{default:l(()=>[e(t,{prop:"password"},{default:l(()=>[e(r,{clearable:"","show-password":"",modelValue:u.password,"onUpdate:modelValue":o[3]||(o[3]=s=>u.password=s),placeholder:"\u5BC6\u7801","prefix-icon":a(f)("lock")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),e(a(n),{delay:200},{default:l(()=>[e(t,{rules:E,prop:"repeatPassword"},{default:l(()=>[e(r,{clearable:"","show-password":"",modelValue:u.repeatPassword,"onUpdate:modelValue":o[4]||(o[4]=s=>u.repeatPassword=s),placeholder:"\u786E\u8BA4\u5BC6\u7801","prefix-icon":a(f)("lock")},null,8,["modelValue","prefix-icon"])]),_:1})]),_:1}),e(a(n),{delay:250},{default:l(()=>[e(t,null,{default:l(()=>[e(c,{class:"w-full",size:"default",type:"primary",loading:d.value,onClick:o[5]||(o[5]=s=>x(m.value))},{default:l(()=>[_(" \u786E\u5B9A ")]),_:1},8,["loading"])]),_:1})]),_:1}),e(a(n),{delay:300},{default:l(()=>[e(t,null,{default:l(()=>[e(c,{class:"w-full",size:"default",onClick:B},{default:l(()=>[_(" \u8FD4\u56DE ")]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])}}});var M=F(T,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/login/components/update.vue"]]);export{M as default};