| 1 |
- var I=Object.defineProperty;var P=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var v=(e,s,o)=>s in e?I(e,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[s]=o,y=(e,s)=>{for(var o in s||(s={}))b.call(s,o)&&v(e,o,s[o]);if(P)for(var o of P(s))S.call(s,o)&&v(e,o,s[o]);return e};var _=(e,s,o)=>new Promise((t,r)=>{var u=c=>{try{d(o.next(c))}catch(n){r(n)}},f=c=>{try{d(o.throw(c))}catch(n){r(n)}},d=c=>c.done?t(c.value):Promise.resolve(c.value).then(u,f);d((o=o.apply(e,s)).next())});import{e as O,at as w,_ as E}from"./entry/index-BaQQ7BQ_.js";import{f as j,c as l,u as i,d as L,Z as B,_ as x,$ as h,a0 as G}from"./vue-CF9JqwIh.js";var a=(e=>(e[e.LOGIN=0]="LOGIN",e[e.REGISTER=1]="REGISTER",e[e.RESET_PASSWORD=2]="RESET_PASSWORD",e[e.MOBILE=3]="MOBILE",e[e.QR_CODE=4]="QR_CODE",e))(a||{});const F=j(0);function C(){function e(t){F.value=t}const s=l(()=>F.value);function o(){e(0)}return{setLoginState:e,getLoginState:s,handleBackLogin:o}}function V(e){const s=l(()=>{var r;const t=i(e);return(r=t==null?void 0:t.validate)!=null?r:u=>Promise.resolve()});function o(){return _(this,null,function*(){const t=i(e);return t?yield t.validate():void 0})}return{validate:s,validForm:o}}function $(e){const{t:s}=O(),o=l(()=>R(s("sys.login.accountPlaceholder"))),t=l(()=>R(s("sys.login.passwordPlaceholder"))),r=l(()=>R(s("sys.login.smsPlaceholder"))),u=l(()=>R(s("sys.login.mobilePlaceholder"))),f=(n,g)=>_(this,null,function*(){return g?Promise.resolve():Promise.reject(s("sys.login.policyPlaceholder"))}),d=n=>(g,m)=>_(this,null,function*(){return m?m!==n?Promise.reject(s("sys.login.diffPwd")):Promise.resolve():Promise.reject(s("sys.login.passwordPlaceholder"))});return{getFormRules:l(()=>{const n=i(o),g=i(t),m=i(r),T=i(u),p={sms:m,mobile:T};switch(i(F)){case 1:return y({account:n,password:g,confirmPassword:[{validator:d(e==null?void 0:e.password),trigger:"change"}],policy:[{validator:f,trigger:"change"}]},p);case 2:return y({account:n},p);case 3:return p;default:return{account:n,password:g}}})}}function R(e){return[{required:!0,message:e,trigger:"change"}]}const M={class:"flex items-center justify-center mb-8"},A={class:"mr-4 text-4xl font-bold title"},N=["alt"],k=L({__name:"LoginFormTitle",setup(e){const{t:s}=O(),{getLoginState:o}=C(),t=l(()=>({[a.RESET_PASSWORD]:s("sys.login.forgetFormTitle"),[a.LOGIN]:s("sys.login.signInFormTitle"),[a.REGISTER]:s("sys.login.signUpFormTitle"),[a.MOBILE]:s("sys.login.mobileSignInFormTitle"),[a.QR_CODE]:s("sys.login.qrSignInFormTitle")})[i(o)]);return(r,u)=>(B(),x("div",M,[h("h2",A,G(t.value),1),h("img",{alt:t.value,src:w,class:"logo"},null,8,N)]))}}),D=E(k,[["__scopeId","data-v-3c402de0"]]),z=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"}));export{D as L,V as a,C as b,a as c,z as d,$ as u};
|