优化TabPage标签布局:使用justify-content: space-between实现标题靠左显示,关闭按钮靠右显示

This commit is contained in:
zqm
2025-11-05 15:20:29 +08:00
parent da7df26930
commit 7e44317b94

View File

@@ -100,6 +100,7 @@ const closeTab = (tabId) => {
.tab-item {
display: flex;
align-items: center;
justify-content: space-between;
height: 26px;
padding: 0 16px;
margin-left: 1px;
@@ -112,8 +113,7 @@ const closeTab = (tabId) => {
font-size: 12px;
user-select: none;
position: relative;
min-width: fit-content;
flex: 0 0 auto;
width: fit-content;
}
.tab-title {
@@ -122,6 +122,8 @@ const closeTab = (tabId) => {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
margin-right: 8px;
}
.tab-item.active {
@@ -144,7 +146,6 @@ const closeTab = (tabId) => {
}
.button-icon {
margin-left: 8px;
margin-right: -8px;
background: transparent;
border: none;