初始化 antd-pro
This commit is contained in:
13
admin-web/src/components/Authorized/AuthorizedRoute.d.ts
vendored
Normal file
13
admin-web/src/components/Authorized/AuthorizedRoute.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import * as React from 'react';
|
||||
import { RouteProps } from 'react-router';
|
||||
|
||||
type authorityFN = (currentAuthority?: string) => boolean;
|
||||
|
||||
type authority = string | string[] | authorityFN | Promise<any>;
|
||||
|
||||
export interface IAuthorizedRouteProps extends RouteProps {
|
||||
authority: authority;
|
||||
}
|
||||
export { authority };
|
||||
|
||||
export default class AuthorizedRoute extends React.Component<IAuthorizedRouteProps, any> {}
|
||||
Reference in New Issue
Block a user