feat(pageHeader): popup 模式下隐藏 PageHeader 组件

This commit is contained in:
雨霖铃
2026-05-21 00:38:00 +08:00
parent 704ec7289d
commit 604fbb4d1f
2 changed files with 21 additions and 1 deletions
+7 -1
View File
@@ -1,5 +1,6 @@
import { alpha, Box, Stack, SxProps, Theme, Typography, useTheme } from '@mui/material';
import { ReactNode } from 'react';
import { ReactNode, useMemo } from 'react';
import { getEntryPointType } from '@/config/features';
/**
* PageHeader 组件属性接口
@@ -64,6 +65,11 @@ export default function PageHeader({
}: PageHeaderProps) {
const theme = useTheme();
const resolvedIconColor = iconColor ?? theme.palette.primary.main;
const entryPointType = useMemo(() => getEntryPointType(), []);
if (entryPointType === 'popup') {
return null;
}
return (
<Stack direction="row" spacing={1.5} alignItems="center" sx={{ mb: 2.5, ...sx }}>