LOCKING盒子版
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

index.tsx 758 B

3 år sedan
1234567891011121314151617181920212223242526272829
  1. import { useModel } from 'umi';
  2. import AppHeader from '@/components/AppHeader';
  3. import { RouteProps } from 'react-router';
  4. import React from 'react';
  5. import styles from './indexLayout.less';
  6. export default function IndexLayout(props: RouteProps) {
  7. const { isLogin } = useModel('useAuthModel');
  8. const isLoginView = props.location
  9. return (
  10. <div className={styles.app}>
  11. <AppHeader className={styles.header} />
  12. <main className={styles.main}>
  13. {
  14. isLogin
  15. ? (
  16. <div className={styles.nav}>
  17. </div>
  18. )
  19. : null
  20. }
  21. <div className={styles.content}>
  22. {isLogin || isLoginView ? props.children : null}
  23. </div>
  24. </main>
  25. </div>
  26. )
  27. }