import"./default.76e08716.js";import{F as s,I as x,_ as w}from"./index.0e96b1ad.js";import"./index.b2c65497.js";import{u as h,F as l}from"./index.5ec54e89.js";import{B as y}from"./index.0857d90f.js";import{u as k,r as F,a as B,c as R,o as C,b as U,d,e as t,w as r,f as m,U as S,L as M,p as N,g as V,h as j}from"./index.ab0d47a4.js";import{_ as q}from"./_plugin-vue_export-helper.cdc0426e.js";import"./index.9923b5dc.js";import{_ as A}from"./Password.ee3cd4fa.js";import"./index.8c51b797.js";import"./useFlexGapSupport.f5eec5c4.js";import"./index.9c196d1a.js";s.useInjectFormItemContext=h;s.ItemRest=l;s.install=function(e){return e.component(s.name,s),e.component(s.Item.name,s.Item),e.component(l.name,l),e};const L={username:[{required:!0,message:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",trigger:"blur"},{min:5,max:20,message:"5~20",trigger:"blur"}],password:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801",trigger:"blur"},{min:6,max:12,message:"6~12",trigger:"blur"}]};const O=e=>(N("data-v-1736884d"),e=e(),V(),e),D={class:"login"},P={class:"continer"},T=O(()=>d("h1",null,"Mini RBAC",-1)),$=j("\u767B\u5F55"),z={__name:"login",setup(e){const p=k(),_=F(),o=B({username:"admin",password:"123456"}),c=R(()=>!(o.username&&o.password)),f=i=>{!i||i.validate().then(()=>p.loginAction(o))};return(i,n)=>{const g=x,u=w,v=A,b=y,I=s;return C(),U("div",D,[d("div",P,[T,t(I,{ref_key:"formRef",ref:_,model:o,rules:m(L)},{default:r(()=>[t(u,{"has-feedback":"",name:"username"},{default:r(()=>[t(g,{value:o.username,"onUpdate:value":n[0]||(n[0]=a=>o.username=a),valueModifiers:{trim:!0},placeholder:"Username"},{prefix:r(()=>[t(m(S),{style:{color:"rgba(0, 0, 0, 0.25)"}})]),_:1},8,["value"])]),_:1}),t(u,{"has-feedback":"",name:"password"},{default:r(()=>[t(v,{value:o.password,"onUpdate:value":n[1]||(n[1]=a=>o.password=a),valueModifiers:{trim:!0},placeholder:"Password",autocomplete:"on"},{prefix:r(()=>[t(m(M),{style:{color:"rgba(0, 0, 0, 0.25)"}})]),_:1},8,["value"])]),_:1}),t(u,null,{default:r(()=>[t(b,{type:"primary","html-type":"submit",disabled:m(c),onClick:n[2]||(n[2]=a=>f(_.value))},{default:r(()=>[$]),_:1},8,["disabled"])]),_:1})]),_:1},8,["model","rules"])])])}}},oe=q(z,[["__scopeId","data-v-1736884d"]]);export{oe as default};
