Files
labelimage/app/layout.tsx
2026-04-09 18:20:12 +08:00

72 lines
1.9 KiB
TypeScript

"use client"
import "@mantine/core/styles.css"
import "@mantine/core/styles.layer.css"
import "@mantine/dates/styles.css"
import "@mantine/notifications/styles.css"
import "mantine-datatable/styles.css"
import Script from "next/script"
import { InfoCheck } from "@/app/store/InfoCheck"
import { OptStore } from "@/components/label/OptStore"
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"
const GLOBAL_NOTICE_Z_INDEX = 4000
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="light" />
<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="light" theme={theme}>
<Notifications zIndex={GLOBAL_NOTICE_Z_INDEX} withinPortal />
<InfoCheck />
<OptStore />
<ModalsProvider>
<Suspense fallback={<></>}>{children}</Suspense>
</ModalsProvider>
</MantineProvider>
</body>
</html>
)
}