ant-design / ant-design/pro-components

🧐[问题] PageContainer 组件 有header了,但是内容区域还是有padding-block-start

Open
#7,776 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

提问前先看看:

### 🧐 问题描述
基于@umijs/max创建的项目,在使用page container时,明明已经有header了,但还是出现了`ant-pro-page-container-children-container-no-header`类
如下:
![image](https://github.com/ant-design/pro-components/assets/34732107/0e56eccf-1507-461b-8e5a-33f4bea63fd5)

### 💻 示例代码

```tsx

{messageContextHolder}




```

### 🚑 其他信息
我是给予umijs/max创建的项目,配置如下:
```ts
// .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
}
}
};
```

### 版本信息
```text
"@ant-design/icons": "^5.2.6",
"@ant-design/pro-components": "^2.6.23",
"@umijs/max": "^4.0.81",
"antd": "^5.9.2",
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the PageContainer example in a @umijs/max project using the supplied layout configuration and versions. Inspect the PageContainer implementation and the handling of the ant-pro-page-container-children-container-no-header class. Done means the content does not receive an incorrect padding-block-start when a header is present, with the existing example behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.