Authorized.js 288 Bytes 编辑Web IDE 1 2 3 4 5 6 7 8 import CheckPermissions from './CheckPermissions'; const Authorized = ({ children, authority, noMatch = null }) => { const childrenRender = typeof children === 'undefined' ? null : children; return CheckPermissions(authority, childrenRender, noMatch); }; export default Authorized;