feat: 完成系统监控页面
This commit is contained in:
@@ -27,15 +27,10 @@ export default defineConfig({
|
|||||||
component: './Home',
|
component: './Home',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '权限演示',
|
|
||||||
path: '/access',
|
|
||||||
component: './Access',
|
|
||||||
},
|
|
||||||
/*{
|
|
||||||
name: ' 系统监控',
|
name: ' 系统监控',
|
||||||
path: '/redis',
|
path: '/redis',
|
||||||
component: './Redis',
|
component: './Redis',
|
||||||
},*/
|
},
|
||||||
{
|
{
|
||||||
name: ' 用户配置',
|
name: ' 用户配置',
|
||||||
path: '/user',
|
path: '/user',
|
||||||
|
@@ -1,21 +0,0 @@
|
|||||||
import { PageContainer } from '@ant-design/pro-components';
|
|
||||||
import { Access, useAccess } from '@umijs/max';
|
|
||||||
import { Button } from 'antd';
|
|
||||||
|
|
||||||
const AccessPage: React.FC = () => {
|
|
||||||
const access = useAccess();
|
|
||||||
return (
|
|
||||||
<PageContainer
|
|
||||||
ghost
|
|
||||||
header={{
|
|
||||||
title: '权限示例',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Access accessible={access.canSeeAdmin}>
|
|
||||||
<Button>只有 Admin 可以看到这个按钮</Button>
|
|
||||||
</Access>
|
|
||||||
</PageContainer>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default AccessPage;
|
|
Reference in New Issue
Block a user