feat: 本次提交更新内容如下
搞登录拦截模块
This commit is contained in:
20
nkebao/src/components/Layout/Layout.tsx
Normal file
20
nkebao/src/components/Layout/Layout.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from "react";
|
||||
import styles from "./layout.module.scss";
|
||||
interface LayoutProps {
|
||||
loading?: boolean;
|
||||
children?: React.ReactNode;
|
||||
header?: React.ReactNode;
|
||||
footer?: React.ReactNode;
|
||||
}
|
||||
|
||||
const Layout: React.FC<LayoutProps> = ({ children, header, footer }) => {
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
{header && <header>{header}</header>}
|
||||
<main>{children}</main>
|
||||
{footer && <footer>{footer}</footer>}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Layout;
|
||||
10
nkebao/src/components/Layout/layout.module.scss
Normal file
10
nkebao/src/components/Layout/layout.module.scss
Normal file
@@ -0,0 +1,10 @@
|
||||
.container {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.container main {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
Reference in New Issue
Block a user