BasicLayout.js 509 Bytes
Newer Older
duanledexianxianxian's avatar
init  
duanledexianxianxian committed
1 2 3
import React from 'react';
import HomeLayout from './HomeLayout';
import BlankLayout from './BlankLayout';
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
4
import {getActiveRoute} from '@/utils';
duanledexianxianxian's avatar
init  
duanledexianxianxian committed
5 6 7

const Index = (props) => {
  console.log(props);
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
8
  const item =getActiveRoute(props.route.routes,props.location.pathname);
duanledexianxianxian's avatar
init  
duanledexianxianxian committed
9 10 11 12 13 14 15 16 17 18 19 20 21
  if (item && item.isFull) {
    console.log('full layout');
    return <BlankLayout>{props.children}</BlankLayout>;
  }

  return (
    <>
      <HomeLayout {...props}>{props.children}</HomeLayout>
    </>
  );
};

export default Index;