2 lines
2.2 KiB
JavaScript
2 lines
2.2 KiB
JavaScript
import{b as _}from"./user.12858b8e.js";import{I as g,r as b,d as n,o as V,k as x,w as l,e as r,f as s,n as m,v as y}from"./index.064676a5.js";const k={__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:(p,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(p=>{p&&_(e.oldPassword,e.newPassword).then(o=>{u.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F")})})}function c(){u.$tab.closePage()}return(p,o)=>{const a=n("el-input"),t=n("el-form-item"),w=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(w,{type:"primary",onClick:f},{default:l(()=>[m("\u4FDD\u5B58")]),_:1}),r(w,{type:"danger",onClick:c},{default:l(()=>[m("\u5173\u95ED")]),_:1})]),_:1})]),_:1},8,["model","rules"])}}};export{k as default};
|