2 lines
2.3 KiB
JavaScript
2 lines
2.3 KiB
JavaScript
import{_ as P,A as g,r as b,d as n,o as V,k as x,w as l,e as o,f as r,m,s as y}from"./index.955aa49e.js";import{b as q}from"./user.45cee2d5.js";const v={__name:"resetPwd",setup(k){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,s,a)=>{e.newPassword!==s?a(new Error("\u4E24\u6B21\u8F93\u5165\u7684\u5BC6\u7801\u4E0D\u4E00\u81F4")):a()},trigger:"blur"}]});function f(){u.$refs.pwdRef.validate(p=>{p&&q(e.oldPassword,e.newPassword).then(s=>{u.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F")})})}function c(){u.$tab.closePage()}return(p,s)=>{const a=n("el-input"),t=n("el-form-item"),w=n("el-button"),_=n("el-form");return V(),x(_,{ref:"pwdRef",model:r(e),rules:r(i),"label-width":"80px"},{default:l(()=>[o(t,{label:"\u65E7\u5BC6\u7801",prop:"oldPassword"},{default:l(()=>[o(a,{modelValue:r(e).oldPassword,"onUpdate:modelValue":s[0]||(s[0]=d=>r(e).oldPassword=d),placeholder:"\u8BF7\u8F93\u5165\u65E7\u5BC6\u7801",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),o(t,{label:"\u65B0\u5BC6\u7801",prop:"newPassword"},{default:l(()=>[o(a,{modelValue:r(e).newPassword,"onUpdate:modelValue":s[1]||(s[1]=d=>r(e).newPassword=d),placeholder:"\u8BF7\u8F93\u5165\u65B0\u5BC6\u7801",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),o(t,{label:"\u786E\u8BA4\u5BC6\u7801",prop:"confirmPassword"},{default:l(()=>[o(a,{modelValue:r(e).confirmPassword,"onUpdate:modelValue":s[2]||(s[2]=d=>r(e).confirmPassword=d),placeholder:"\u8BF7\u786E\u8BA4\u65B0\u5BC6\u7801",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),o(t,null,{default:l(()=>[o(w,{type:"primary",onClick:f},{default:l(()=>[m("\u4FDD\u5B58")]),_:1}),o(w,{type:"danger",onClick:c},{default:l(()=>[m("\u5173\u95ED")]),_:1})]),_:1})]),_:1},8,["model","rules"])}}},T=P(v,[["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/views/system/user/profile/resetPwd.vue"]]);export{T as default};
|