feat(project): init
This commit is contained in:
66
app/layout.tsx
Normal file
66
app/layout.tsx
Normal file
@@ -0,0 +1,66 @@
|
||||
"use client"
|
||||
|
||||
import "@mantine/core/styles.css"
|
||||
import "@mantine/core/styles.layer.css"
|
||||
import "@mantine/notifications/styles.css"
|
||||
import "mantine-datatable/styles.layer.css"
|
||||
import Script from "next/script"
|
||||
|
||||
import { InfoCheck } from "@/app/store/InfoCheck"
|
||||
import {
|
||||
ColorSchemeScript,
|
||||
MantineProvider,
|
||||
// createTheme,
|
||||
mantineHtmlProps,
|
||||
} from "@mantine/core"
|
||||
import { ModalsProvider } from "@mantine/modals"
|
||||
import { Notifications } from "@mantine/notifications"
|
||||
import { Suspense } from "react"
|
||||
import "./globals.css"
|
||||
import { theme } from "./theme"
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
// const theme = createTheme({
|
||||
// colors: {
|
||||
// blue: [
|
||||
// "#e3f2fd", // 0
|
||||
// "#bbdefb", // 1
|
||||
// "#90caf9", // 2
|
||||
// "#e8f0ff", // 3 ← dark默认主色
|
||||
// "#42a5f5", // 4
|
||||
// "#2196f3", // 5
|
||||
// "#145bff", // 6 ← 默认主色
|
||||
// "#1976d2", // 7
|
||||
// "#1565c0", // 8
|
||||
// "#0d47a1", // 9
|
||||
// ],
|
||||
// },
|
||||
// })
|
||||
return (
|
||||
<html lang="en" {...mantineHtmlProps}>
|
||||
<head>
|
||||
<ColorSchemeScript defaultColorScheme="auto" />
|
||||
<Script
|
||||
src="https://lf-scm-cn.feishucdn.com/lark/op/h5-js-sdk-1.5.44.js"
|
||||
strategy="afterInteractive"
|
||||
onLoad={() => {
|
||||
console.log("飞书 SDK 加载完成", window.h5sdk)
|
||||
}}
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<MantineProvider defaultColorScheme="auto" theme={theme}>
|
||||
<Notifications />
|
||||
<InfoCheck />
|
||||
<ModalsProvider>
|
||||
<Suspense fallback={<></>}>{children}</Suspense>
|
||||
</ModalsProvider>
|
||||
</MantineProvider>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user