index-7134135d.js 3.4 KB

1
  1. /* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{m as e,V as l,W as a,u as s,q as t,d as r,y as o,o as i,c as m,e as d,f as u,t as n,a as p,w as c,X as g,l as f,Y as w,Z as x,$ as b,U as v,a0 as h,b as y,a1 as _,a2 as j,a3 as V,a4 as $,_ as k}from"./index-ca84c486.js";import{l as q}from"./logo-643de963.js";const U={class:"flex items-center justify-center h-screen bg-gray-50"},z={class:"flex w-full sm:w-[32rem] shadow bg-white lg:rounded-lg"},A={class:"w-full pt-6 pb-6 pl-4 pr-4 mx-auto"},C={class:"flex mt-2"},H=["src"],I={class:"w-full mt-6 mb-8 text-2xl text-center text-indigo-700"},Y={class:"flex justify-between w-11/12 mx-auto mt-3 sm:w-4/5"},D={class:"w-11/12 mx-auto mt-5 sm:w-4/5"},E={class:"w-full mt-8 mb-10 text-sm text-center text-gray-400"},F=k(r({__name:"index",setup(r){const{params:k,loading:F,submit:J,form:S,rules:W}=(()=>{const r=e({});r.value={email:"",password:"",remember:!1};const o=e(!1),i=l({email:[{required:!0,message:a("login.verify.email.required"),trigger:"blur"},{type:"email",message:a("login.verify.email.invalid"),trigger:"blur"}],password:[{required:!0,message:a("login.verify.password.required"),trigger:"blur"}]}),m=e();return{params:r,rules:i,loading:o,submit:e=>{e&&e.validate((e=>{if(!e)return!1;o.value=!0,s().login(r.value).then((()=>{o.value=!1,t.push({path:"/"})})).catch((e=>{o.value=!1}))}))},form:m}})(),X=()=>{t.push({path:"find"})};return o((()=>{var e;null==(e=document.querySelector("html"))||e.setAttribute("class","light")})),(e,l)=>{const a=w,s=V,t=$,r=x,o=b,Z=v,B=h;return i(),m("div",U,[d("div",z,[d("div",A,[d("div",C,[d("img",{src:u(q),class:"w-8 mx-auto"},null,8,H)]),d("div",I,"Hi, "+n(e.$t("login.welcome")),1),p(a,null,{default:c((()=>[y(n(e.$t("login.sign_in")),1)])),_:1}),d("div",null,[g((i(),f(r,{ref_key:"form",ref:S,model:u(k),"status-icon":"",rules:u(W),"element-loading-background":"rgba(0, 0, 0, 0.7)","label-width":"70px",class:"w-11/12 pt-2 mx-auto space-y-8 sm:w-4/5"},{default:c((()=>[p(t,{prop:"email"},{default:c((()=>[p(s,{modelValue:u(k).email,"onUpdate:modelValue":l[0]||(l[0]=e=>u(k).email=e),clearable:"",type:"email",autocomplete:"off",placeholder:e.$t("login.email"),size:"large","prefix-icon":u(_),class:"h-12 text-base"},null,8,["modelValue","placeholder","prefix-icon"])])),_:1}),p(t,{prop:"password"},{default:c((()=>[p(s,{modelValue:u(k).password,"onUpdate:modelValue":l[1]||(l[1]=e=>u(k).password=e),type:"password",clearable:"",autocomplete:"off",size:"large",placeholder:e.$t("login.password"),"show-password":"","prefix-icon":u(j),class:"h-12 text-base"},null,8,["modelValue","placeholder","prefix-icon"])])),_:1})])),_:1},8,["model","rules"])),[[B,u(F),void 0,{fullscreen:!0,lock:!0}]])]),d("div",Y,[p(o,{modelValue:u(k).remember,"onUpdate:modelValue":l[2]||(l[2]=e=>u(k).remember=e),class:"top-2"},{default:c((()=>[y(n(e.$t("login.remember")),1)])),_:1},8,["modelValue"]),d("div",{class:"pt-3 text-sm text-indigo-600 cursor-pointer",onClick:X},n(e.$t("login.lost_password")),1)]),d("div",D,[p(Z,{type:"primary",onClick:l[3]||(l[3]=e=>u(J)(u(S))),size:"large",class:"w-full text-xl"},{default:c((()=>[y(n(e.$t("login.sign_in")),1)])),_:1})]),d("div",E,n(e.$t("system.name"))+" @copyright 2018-"+n((new Date).getFullYear()),1)])])])}}}),[["__scopeId","data-v-f3adc66e"]]);export{F as default};