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