ResetPwd-3d4fab17.js 2.5 KB

1
  1. import{d as h,u as V,ao as y,B as x,r as R,g as n,o as q,k as v,w,i as d,a as e,I as M,J as U,_ as k,__tla as z}from"./index-66208f93.js";import{u as I,__tla as j}from"./tagsView-cb0f0f7f.js";import{I as i,__tla as A}from"./InputPassword-b6878da9.js";import{c as B,__tla as D}from"./profile-d46c17e2.js";import{u as E,__tla as F}from"./useMessage-798a77de.js";import{__tla as J}from"./InputPassword.vue_vue_type_style_index_0_scoped_3f07eb1d_lang-3377cbc9.js";let m,O=Promise.all([(()=>{try{return z}catch{}})(),(()=>{try{return j}catch{}})(),(()=>{try{return A}catch{}})(),(()=>{try{return D}catch{}})(),(()=>{try{return F}catch{}})(),(()=>{try{return J}catch{}})()]).then(async()=>{m=k(h({name:"ResetPwd",__name:"ResetPwd",setup(S,{expose:_}){const{push:C,replace:p}=V(),f=y(),c=I(),{t:r}=x(),P=E(),u=R(),s=n({oldPassword:"",newPassword:"",confirmPassword:""}),g=n({oldPassword:[{required:!0,message:r("profile.password.oldPwdMsg"),trigger:"blur"},{min:6,max:20,message:r("profile.password.pwdRules"),trigger:"blur"}],newPassword:[{required:!0,message:r("profile.password.newPwdMsg"),trigger:"blur"},{min:6,max:20,message:r("profile.password.pwdRules"),trigger:"blur"}],confirmPassword:[{required:!0,message:r("profile.password.cfPwdMsg"),trigger:"blur"},{required:!0,validator:(l,a,o)=>{s.newPassword!==a?o(new Error(r("profile.password.diffPwd"))):o()},trigger:"blur"}]});return _({reset:l=>{l&&l.resetFields()},submit:l=>{l&&l.validate(async a=>{a&&(await B(s.oldPassword,s.newPassword),P.success(r("common.updateSuccess")),await f.loginOut(),c.delAllViews(),p("/login?redirect=/index"))})},formRef:u}),(l,a)=>{const o=M,b=U;return q(),v(b,{ref_key:"formRef",ref:u,model:e(s),rules:e(g),"label-width":200},{default:w(()=>[d(o,{label:e(r)("profile.password.oldPassword"),prop:"oldPassword"},{default:w(()=>[d(e(i),{modelValue:e(s).oldPassword,"onUpdate:modelValue":a[0]||(a[0]=t=>e(s).oldPassword=t)},null,8,["modelValue"])]),_:1},8,["label"]),d(o,{label:e(r)("profile.password.newPassword"),prop:"newPassword"},{default:w(()=>[d(e(i),{modelValue:e(s).newPassword,"onUpdate:modelValue":a[1]||(a[1]=t=>e(s).newPassword=t),strength:""},null,8,["modelValue"])]),_:1},8,["label"]),d(o,{label:e(r)("profile.password.confirmPassword"),prop:"confirmPassword"},{default:w(()=>[d(e(i),{modelValue:e(s).confirmPassword,"onUpdate:modelValue":a[2]||(a[2]=t=>e(s).confirmPassword=t),strength:""},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model","rules"])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/Profile/components/ResetPwd.vue"]])});export{O as __tla,m as default};