import{b as _}from"./user.9a46bded.js";import{D as g,r as b,d as n,o as V,j as x,w as l,e as r,f as s,m as w,s as y}from"./index.1974707a.js";const U={__name:"resetPwd",setup(q){const{proxy:u}=y(),e=g({oldPassword:void 0,newPassword:void 0,confirmPassword:void 0}),i=b({oldPassword:[{required:!0,message:"\u65E7\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],newPassword:[{required:!0,message:"\u65B0\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"},{min:6,max:20,message:"\u957F\u5EA6\u5728 6 \u5230 20 \u4E2A\u5B57\u7B26",trigger:"blur"}],confirmPassword:[{required:!0,message:"\u786E\u8BA4\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"},{required:!0,validator:(m,o,a)=>{e.newPassword!==o?a(new Error("\u4E24\u6B21\u8F93\u5165\u7684\u5BC6\u7801\u4E0D\u4E00\u81F4")):a()},trigger:"blur"}]});function f(){u.$refs.pwdRef.validate(m=>{m&&_(e.oldPassword,e.newPassword).then(o=>{u.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F")})})}function c(){u.$tab.closePage()}return(m,o)=>{const a=n("el-input"),t=n("el-form-item"),p=n("el-button"),P=n("el-form");return V(),x(P,{ref:"pwdRef",model:s(e),rules:s(i),"label-width":"80px"},{default:l(()=>[r(t,{label:"\u65E7\u5BC6\u7801",prop:"oldPassword"},{default:l(()=>[r(a,{modelValue:s(e).oldPassword,"onUpdate:modelValue":o[0]||(o[0]=d=>s(e).oldPassword=d),placeholder:"\u8BF7\u8F93\u5165\u65E7\u5BC6\u7801",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),r(t,{label:"\u65B0\u5BC6\u7801",prop:"newPassword"},{default:l(()=>[r(a,{modelValue:s(e).newPassword,"onUpdate:modelValue":o[1]||(o[1]=d=>s(e).newPassword=d),placeholder:"\u8BF7\u8F93\u5165\u65B0\u5BC6\u7801",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),r(t,{label:"\u786E\u8BA4\u5BC6\u7801",prop:"confirmPassword"},{default:l(()=>[r(a,{modelValue:s(e).confirmPassword,"onUpdate:modelValue":o[2]||(o[2]=d=>s(e).confirmPassword=d),placeholder:"\u8BF7\u786E\u8BA4\u65B0\u5BC6\u7801",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),r(t,null,{default:l(()=>[r(p,{type:"primary",onClick:f},{default:l(()=>[w("\u4FDD\u5B58")]),_:1}),r(p,{type:"danger",onClick:c},{default:l(()=>[w("\u5173\u95ED")]),_:1})]),_:1})]),_:1},8,["model","rules"])}}};export{U as default};