1 |
- import{d as b,r as y,e as u,o as h,x as V,w as n,f as l,a as e,h as v,C as x,H as R,_ as k,__tla as q}from"./index-26ff80c5.js";import{_ as C,__tla as U}from"./XButton-f99568e7.js";import{I as m,__tla as z}from"./InputPassword-aa1abead.js";import{a as M,__tla as D}from"./profile-9e56f5b7.js";import{u as E,__tla as F}from"./useMessage-325dbb2c.js";let _,H=Promise.all([(()=>{try{return q}catch{}})(),(()=>{try{return U}catch{}})(),(()=>{try{return z}catch{}})(),(()=>{try{return D}catch{}})(),(()=>{try{return F}catch{}})()]).then(async()=>{_=k(b({name:"ResetPwd",__name:"ResetPwd",setup(I){const{t:r}=v(),f=E(),w=y(),s=u({oldPassword:"",newPassword:"",confirmPassword:""}),p=u({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:(c,a,o)=>{s.newPassword!==a?o(new Error(r("profile.password.diffPwd"))):o()},trigger:"blur"}]});return(c,a)=>{const o=x,i=C,P=R;return h(),V(P,{ref_key:"formRef",ref:w,model:e(s),rules:e(p),"label-width":200},{default:n(()=>[l(o,{label:e(r)("profile.password.oldPassword"),prop:"oldPassword"},{default:n(()=>[l(e(m),{modelValue:e(s).oldPassword,"onUpdate:modelValue":a[0]||(a[0]=t=>e(s).oldPassword=t)},null,8,["modelValue"])]),_:1},8,["label"]),l(o,{label:e(r)("profile.password.newPassword"),prop:"newPassword"},{default:n(()=>[l(e(m),{modelValue:e(s).newPassword,"onUpdate:modelValue":a[1]||(a[1]=t=>e(s).newPassword=t),strength:""},null,8,["modelValue"])]),_:1},8,["label"]),l(o,{label:e(r)("profile.password.confirmPassword"),prop:"confirmPassword"},{default:n(()=>[l(e(m),{modelValue:e(s).confirmPassword,"onUpdate:modelValue":a[2]||(a[2]=t=>e(s).confirmPassword=t),strength:""},null,8,["modelValue"])]),_:1},8,["label"]),l(o,null,{default:n(()=>[l(i,{title:e(r)("common.save"),type:"primary",onClick:a[3]||(a[3]=t=>{var d;(d=e(w))&&d.validate(async g=>{g&&(await M(s.oldPassword,s.newPassword),f.success(r("common.updateSuccess")))})})},null,8,["title"]),l(i,{title:e(r)("common.reset"),type:"danger",onClick:a[4]||(a[4]=t=>{var d;(d=e(w))&&d.resetFields()})},null,8,["title"])]),_:1})]),_:1},8,["model","rules"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/Profile/components/ResetPwd.vue"]])});export{H as __tla,_ as default};
|