--- order: 2 title: zh-CN: 使用方法作为参数 en-US: Use function as a parameter --- Use Function as a parameter ```jsx import RenderAuthorized from 'ant-design-pro/lib/Authorized'; import { Alert } from 'antd'; const Authorized = RenderAuthorized('user'); const noMatch = ; const havePermission = () => { return false; }; ReactDOM.render( , mountNode, ); ```