next.js搭建路由01
This commit is contained in:
18
crop-x/src/app/layout.tsx
Normal file
18
crop-x/src/app/layout.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import {Navbar} from "../components/layouts/Navbar"
|
||||
import '@/styles/globals.css'
|
||||
export default function DashboardLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>
|
||||
<Navbar></Navbar>
|
||||
{/* 布局 UI */}
|
||||
{/* 将 children 放在您希望渲染页面或嵌套布局的位置 */}
|
||||
<main>{children}</main>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user