import React from 'react'; import { Route, Redirect } from 'react-router-dom'; import Authorized from './Authorized'; // TODO: umi只会返回render和rest const AuthorizedRoute = ({ component: Component, render, authority, redirectPath, ...rest }) => ( } />} > (Component ? : render(props))} /> ); export default AuthorizedRoute;