前端: 添加Layout布局组件

This commit is contained in:
Frontend Developer 2026-03-10 09:41:55 +00:00
parent f45b578829
commit 70ec87b4a4

View 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;