import{d as k,y as C,q as V,r as a,o as u,i as b,j as t,e as l,D as i,h as w,g as d,E as x,c as B,F as S,C as P,ap as z,K as H,aH as N}from "./index-f5e1fd05.js";import{u as m}from "./user-87fa3374.js";const U={class:"card-header"},F=k({name:"PermissionPage",__name:"index",setup(j){var n;const s=C(()=>({width:"85vw",justifyContent:"start"})),o=V((n=m())==null?void 0:n.username),_=[{value:"admin",label:"管理员角色"},{value:"common",label:"普通角色"}];function p(){m().loginByUsername({username:o.value,password:"admin123"}).then(r=>{r.success&&(z().removeItem("async-routes"),H().clearAllCachePage(),N())})}return(r, c)=>{const v=a("el-tag"),f=a("el-option"),y=a("el-select"),g=a("el-card"),h=a("el-space");return u(),b(h,{direction:"vertical",size:"large"},{default:t(()=>[l(v,{style:i(s.value),size:"large",effect:"dark"},{default:t(()=>[w(" 模拟后台根据不同角色返回对应路由（具体参考完整版pure-admin代码） ")]),_:1},8,["style"]),l(g,{shadow:"never",style:i(s.value)},{header:t(()=>[d("div",U,[d("span",null,"当前角色："+x(o.value),1)])]),default:t(()=>[l(y,{modelValue:o.value,"onUpdate:modelValue":c[0]||(c[0]= e=>o.value=e),onChange:p},{default:t(()=>[(u(),B(S,null,P(_, e=>l(f,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["style"])]),_:1})}}});export{F as default};
