fix: prevent tabs header overlap with CustomHeader and reduce height
This commit is contained in:
parent
4fe94592e6
commit
00c66237d1
@ -76,7 +76,8 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Tabs Header样式 - 固定在CustomHeader下方
|
// Tabs Header样式 - 固定在CustomHeader下方
|
||||||
.ant-pro-page-container > .ant-pro-page-container-header,
|
div[class*="page-container-header"],
|
||||||
|
.ant-pro-page-container > div[class*="page-container-header"],
|
||||||
.ant-pro-page-container-header {
|
.ant-pro-page-container-header {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
top: 64px !important; /* CustomHeader的高度,确保在其下方 */
|
top: 64px !important; /* CustomHeader的高度,确保在其下方 */
|
||||||
@ -84,13 +85,15 @@ body {
|
|||||||
left: 220px !important; /* 侧边栏宽度 */
|
left: 220px !important; /* 侧边栏宽度 */
|
||||||
z-index: 1000 !important; /* 低于CustomHeader但高于内容 */
|
z-index: 1000 !important; /* 低于CustomHeader但高于内容 */
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
padding: 8px 24px !important;
|
padding: 4px 24px !important; /* 减小padding */
|
||||||
background: #ffffff !important;
|
background: #ffffff !important;
|
||||||
border-bottom: 1px solid #f0f0f0 !important;
|
border-bottom: 1px solid #f0f0f0 !important;
|
||||||
box-shadow: 0 1px 4px rgba(0,0,0,0.05) !important;
|
box-shadow: 0 1px 4px rgba(0,0,0,0.05) !important;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
min-height: 40px !important; /* 减小最小高度 */
|
min-height: 36px !important; /* 进一步减小最小高度 */
|
||||||
max-height: 60px !important; /* 添加最大高度限制 */
|
max-height: 50px !important; /* 减小最大高度 */
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 当侧边栏折叠时,调整tabs header的left值
|
// 当侧边栏折叠时,调整tabs header的left值
|
||||||
@ -106,50 +109,65 @@ body {
|
|||||||
left: 220px !important;
|
left: 220px !important;
|
||||||
z-index: 1000 !important;
|
z-index: 1000 !important;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
padding: 8px 24px !important;
|
padding: 4px 24px !important;
|
||||||
min-height: 40px !important;
|
min-height: 36px !important;
|
||||||
max-height: 60px !important;
|
max-height: 50px !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tabs样式优化 - 让内容自动撑开
|
// Tabs样式优化 - 让内容自动撑开,减小高度
|
||||||
.ant-pro-page-container-header .tabs-header-only {
|
.ant-pro-page-container-header .tabs-header-only,
|
||||||
|
div[class*="page-container-header"] .tabs-header-only {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
line-height: 1 !important;
|
line-height: 1 !important;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-pro-page-container-header .ant-tabs {
|
.ant-pro-page-container-header .ant-tabs,
|
||||||
|
div[class*="page-container-header"] .ant-tabs {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-pro-page-container-header .ant-tabs-nav {
|
.ant-pro-page-container-header .ant-tabs-nav,
|
||||||
|
div[class*="page-container-header"] .ant-tabs-nav {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-pro-page-container-header .ant-tabs-nav-list {
|
.ant-pro-page-container-header .ant-tabs-nav-list,
|
||||||
|
div[class*="page-container-header"] .ant-tabs-nav-list {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-pro-page-container-header .ant-tabs-tab {
|
.ant-pro-page-container-header .ant-tabs-tab,
|
||||||
padding: 5px 12px !important; /* 减小padding */
|
div[class*="page-container-header"] .ant-tabs-tab {
|
||||||
|
padding: 4px 10px !important; /* 进一步减小padding */
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
border-radius: 4px 4px 0 0;
|
border-radius: 4px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
height: 30px !important; /* 减小标签高度 */
|
height: 28px !important; /* 进一步减小标签高度 */
|
||||||
line-height: 30px !important;
|
line-height: 28px !important;
|
||||||
font-size: 13px; /* 稍微减小字体 */
|
font-size: 13px; /* 稍微减小字体 */
|
||||||
|
display: inline-flex !important;
|
||||||
|
align-items: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-pro-page-container-header .ant-tabs-tab-active {
|
.ant-pro-page-container-header .ant-tabs-tab-active,
|
||||||
|
div[class*="page-container-header"] .ant-tabs-tab-active {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-pro-page-container-header .ant-tabs-ink-bar {
|
.ant-pro-page-container-header .ant-tabs-ink-bar,
|
||||||
|
div[class*="page-container-header"] .ant-tabs-ink-bar {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user