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