动态菜单和动态路由的 antd pro

12345678910111213141516171819202122232425
  1. import React from 'react';
  2. import classNames from 'classnames';
  3. import styles from './index.less';
  4. const StandardFormRow = ({ title, children, last, block, grid, ...rest }) => {
  5. const cls = classNames(styles.standardFormRow, {
  6. [styles.standardFormRowBlock]: block,
  7. [styles.standardFormRowLast]: last,
  8. [styles.standardFormRowGrid]: grid,
  9. });
  10. return (
  11. <div className={cls} {...rest}>
  12. {title && (
  13. <div className={styles.label}>
  14. <span>{title}</span>
  15. </div>
  16. )}
  17. <div className={styles.content}>{children}</div>
  18. </div>
  19. );
  20. };
  21. export default StandardFormRow;