summaryrefslogtreecommitdiff
path: root/static/index-Qw3MVLbR.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/index-Qw3MVLbR.js')
-rw-r--r--static/index-Qw3MVLbR.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/static/index-Qw3MVLbR.js b/static/index-Qw3MVLbR.js
new file mode 100644
index 0000000..a2813e5
--- /dev/null
+++ b/static/index-Qw3MVLbR.js
@@ -0,0 +1 @@
+import{l as k,aE as C,r as f,Z as S,ag as s,m as z,p as I,T as e,q as c,O as t,u as i,a2 as U,S as q,a8 as F,aH as M,aI as R}from"./vue-k1SOGvAh.js";import{e as B,d as E,_ as N}from"./index-zGdLdJAB.js";import{v as H,w as K,x as L,y as T,z as Z}from"./element-ZYmdyXh6.js";import{_ as A}from"./index.vue_vue_type_script_setup_true_lang-dhfgWUeE.js";import"./vxe-hFHEaiBz.js";const D="/v3-admin-vite/static/logo-text-2-lXsH_ESZ.png",O=d=>(M("data-v-79326910"),d=d(),R(),d),X={class:"login-container"},$={class:"login-card"},j=O(()=>c("div",{class:"title"},[c("img",{src:D})],-1)),G={class:"content"},J=k({__name:"index",setup(d){const h=C(),g=f(null),u=f(!1),p=f(""),o=S({username:"admin",password:"12345678",code:""}),w={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:8,max:16,message:"长度在 8 到 16 个字符",trigger:"blur"}],code:[{required:!0,message:"请输入验证码",trigger:"blur"}]},x=()=>{var r;(r=g.value)==null||r.validate((a,l)=>{a?(u.value=!0,E().login(o).then(()=>{h.push({path:"/"})}).catch(()=>{m(),o.password=""}).finally(()=>{u.value=!1})):console.error("表单校验不通过",l)})},m=()=>{o.code="",p.value="",B().then(r=>{p.value=r.data})};return m(),(r,a)=>{const l=s("el-input"),_=s("el-form-item"),v=s("el-icon"),V=s("el-image"),y=s("el-button"),b=s("el-form");return z(),I("div",X,[e(A,{class:"theme-switch"}),c("div",$,[j,c("div",G,[e(b,{ref_key:"loginFormRef",ref:g,model:o,rules:w,onKeyup:F(x,["enter"])},{default:t(()=>[e(_,{prop:"username"},{default:t(()=>[e(l,{modelValue:o.username,"onUpdate:modelValue":a[0]||(a[0]=n=>o.username=n),modelModifiers:{trim:!0},placeholder:"用户名",type:"text",tabindex:"1","prefix-icon":i(H),size:"large"},null,8,["modelValue","prefix-icon"])]),_:1}),e(_,{prop:"password"},{default:t(()=>[e(l,{modelValue:o.password,"onUpdate:modelValue":a[1]||(a[1]=n=>o.password=n),modelModifiers:{trim:!0},placeholder:"密码",type:"password",tabindex:"2","prefix-icon":i(K),size:"large","show-password":""},null,8,["modelValue","prefix-icon"])]),_:1}),e(_,{prop:"code"},{default:t(()=>[e(l,{modelValue:o.code,"onUpdate:modelValue":a[2]||(a[2]=n=>o.code=n),modelModifiers:{trim:!0},placeholder:"验证码",type:"text",tabindex:"3","prefix-icon":i(L),maxlength:"7",size:"large"},{append:t(()=>[e(V,{src:p.value,onClick:m,draggable:"false"},{placeholder:t(()=>[e(v,null,{default:t(()=>[e(i(T))]),_:1})]),error:t(()=>[e(v,null,{default:t(()=>[e(i(Z))]),_:1})]),_:1},8,["src"])]),_:1},8,["modelValue","prefix-icon"])]),_:1}),e(y,{loading:u.value,type:"primary",size:"large",onClick:U(x,["prevent"])},{default:t(()=>[q("登 录")]),_:1},8,["loading"])]),_:1},8,["model"])])])])}}}),oe=N(J,[["__scopeId","data-v-79326910"]]);export{oe as default};