Files
qhmes/deploy-qhmes/frontend/js/index-Bz37qCR3.js
2026-05-15 11:34:12 +08:00

2 lines
1.9 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{d as R,e as l,ah as t,aC as S,as as _,aF as s,k as n,au as a,G as r,av as p}from"./vue-vendor-C7Zq48Yl.js";import{A as E}from"./antd-vue-vendor-BPnV8VqP.js";import P from"./CurrentPermissionMode-CDPPsaCK.js";import{a5 as C,ap as y,bJ as i,d as T}from"./index-BI6CMai0.js";import{P as k}from"./index-C57gqG5N.js";import"./vxe-table-vendor-B88kchpX.js";import"./useContentHeight-BUFNkYs_.js";import"./useWindowSizeFn-PRZSD86C.js";import"./useContentViewHeight-BO9bTdue.js";import"./usePageContext-l-f4bNz7.js";import"./injectionKey-DPVn4AgL.js";const v=R({components:{Alert:E,CurrentPermissionMode:P,PageWrapper:k},setup(){const{changeRole:o}=C(),e=y();return{userStore:e,RoleEnum:i,isSuper:l(()=>e.getRoleList.includes(i.SUPER)),isTest:l(()=>e.getRoleList.includes(i.TEST)),changeRole:o}}}),$={class:"mt-4"};function b(o,e,A,B,U,L){const m=t("CurrentPermissionMode"),d=t("Alert"),u=t("a-button"),c=t("a-button-group"),f=t("PageWrapper");return _(),S(f,{title:"前端权限示例",contentBackground:"",contentClass:"p-4",content:"由于刷新的时候会请求用户信息接口会根据接口重置角色信息所以刷新后界面会恢复原样如果不需要可以注释 src/layout/default/index内的获取用户信息接口"},{default:s(()=>[n(m),a("p",null,[e[2]||(e[2]=r(" 当前角色: ",-1)),a("a",null,p(o.userStore.getRoleList),1)]),n(d,{class:"mt-4",type:"info",message:"点击后请查看左侧菜单变化","show-icon":""}),a("div",$,[e[3]||(e[3]=r(" 权限切换(请先切换权限模式为前端角色权限模式): ",-1)),n(c,null,{default:s(()=>[n(u,{onClick:e[0]||(e[0]=g=>o.changeRole(o.RoleEnum.SUPER)),type:o.isSuper?"primary":"default"},{default:s(()=>[r(p(o.RoleEnum.SUPER),1)]),_:1},8,["type"]),n(u,{onClick:e[1]||(e[1]=g=>o.changeRole(o.RoleEnum.TEST)),type:o.isTest?"primary":"default"},{default:s(()=>[r(p(o.RoleEnum.TEST),1)]),_:1},8,["type"])]),_:1})])]),_:1})}const j=T(v,[["render",b],["__scopeId","data-v-9819a855"]]);export{j as default};