前端: 添加Layout布局组件
This commit is contained in:
parent
f45b578829
commit
70ec87b4a4
22
frontend/src/renderer/components/Layout.jsx
Normal file
22
frontend/src/renderer/components/Layout.jsx
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Layout as AntLayout } from 'antd';
|
||||||
|
import Header from './Header';
|
||||||
|
import Sidebar from './Sidebar';
|
||||||
|
|
||||||
|
const { Content } = AntLayout;
|
||||||
|
|
||||||
|
function AppLayout({ children }) {
|
||||||
|
return (
|
||||||
|
<AntLayout style={{ minHeight: '100vh' }}>
|
||||||
|
<Header />
|
||||||
|
<AntLayout>
|
||||||
|
<Sidebar />
|
||||||
|
<Content style={{ padding: '24px', background: '#fff' }}>
|
||||||
|
{children}
|
||||||
|
</Content>
|
||||||
|
</AntLayout>
|
||||||
|
</AntLayout>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AppLayout;
|
||||||
Loading…
Reference in New Issue
Block a user