39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import React from 'react'
|
|||
|
|
import { Layout } from '@douyinfe/semi-ui'
|
||
|
|
import { useLocation, useOutlet } from 'react-router-dom'
|
||
|
|
import Breadcrumb from '@/layouts/breadcrumb'
|
||
|
|
import Menu from '@/layouts/menu'
|
||
|
|
import './index.scss'
|
||
|
|
import { CSSTransition, SwitchTransition } from 'react-transition-group'
|
||
|
|
|
||
|
|
export default () => {
|
||
|
|
const location = useLocation()
|
||
|
|
const outlet = useOutlet()
|
||
|
|
return (
|
||
|
|
<Layout>
|
||
|
|
<Layout.Sider style={{ backgroundColor: 'var(--semi-color-bg-1)' }}>
|
||
|
|
<Menu />
|
||
|
|
</Layout.Sider>
|
||
|
|
<Layout.Content
|
||
|
|
style={{ padding: '10px', backgroundColor: 'var(--semi-color-bg-0)' }}>
|
||
|
|
<Layout style={{ height: '100%', minHeight: '100%' }}>
|
||
|
|
<Layout.Header style={{ paddingBottom: '10px' }}>
|
||
|
|
<Breadcrumb />
|
||
|
|
</Layout.Header>
|
||
|
|
<Layout.Content>
|
||
|
|
{/*<SwitchTransition mode="out-in">*/}
|
||
|
|
{/* <CSSTransition*/}
|
||
|
|
{/* key={location.key}*/}
|
||
|
|
{/* in={true}*/}
|
||
|
|
{/* timeout={300}*/}
|
||
|
|
{/* classNames="fade">*/}
|
||
|
|
{outlet}
|
||
|
|
{/*</CSSTransition>*/}
|
||
|
|
{/*</SwitchTransition>*/}
|
||
|
|
</Layout.Content>
|
||
|
|
</Layout>
|
||
|
|
</Layout.Content>
|
||
|
|
</Layout>
|
||
|
|
)
|
||
|
|
}
|