Ant Design Pro 鉴权

未完,持续更新

https://pro.ant.design/docs/authority-management-cn

最近需要项目需要用扫码登录,因此就使用antd pro提供的鉴权能力来做

Authorized.ts

提供初始化路由组件和重载路由的函数

import RenderAuthorize from '@/components/Authorized';
import { getAuthority } from './authority';
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable import/no-mutable-exports */
let Authorized = RenderAuthorize(getAuthority());

// Reload the rights component
const reloadAuthorized = (): void => {
  Authorized = RenderAuthorize(getAuthority());
};

export { reloadAuthorized };
export default Authorized;

猜你喜欢

转载自www.cnblogs.com/ww01/p/11711797.html