pro-components
pro-components copied to clipboard
🧐[问题] PageContainer 组件 有header了,但是内容区域还是有padding-block-start
trafficstars
提问前先看看:
🧐 问题描述
基于@umijs/max创建的项目,在使用page container时,明明已经有header了,但还是出现了ant-pro-page-container-children-container-no-header类
如下:
💻 示例代码
<PageContainer>
{messageContextHolder}
<ProCard>
<MaterialIndicatorForm onFinish={onFinish} />
</ProCard>
</PageContainer>
🚑 其他信息
我是给予umijs/max创建的项目,配置如下:
// .umirc.ts
export default defineConfig({
hash: true,
define: {
API_URL: process.env.API_URL,
},
antd: {
theme: {
token: {
colorPrimary: '#F23535',
},
},
},
layout: {
},
model: {},
request: {},
routes: [
{
name: 'admin',
path: '/admin',
routes: [
{
name: 'xxxx',
path: 'xxx',
routes: [
{
name: '创建指标',
path: 'indicator/create',
hideInMenu: true,
component: 'admin/xxxcreate'
}
]
},
]
}
],
npmClient: "pnpm",
tailwindcss: {},
mock: {},
});
// src/app.ts
export const layout: RunTimeLayoutConfig = () => {
return {
token: {
header: {
heightLayoutHeader: 48,
},
},
title: '系统title',
splitMenus: true,
layout: 'top',
fixedHeader: true,
contentStyle: {
padding: 0,
flex: 1
}
}
};
版本信息
"@ant-design/icons": "^5.2.6",
"@ant-design/pro-components": "^2.6.23",
"@umijs/max": "^4.0.81",
"antd": "^5.9.2",