修改TabPage页标签,添加专用容器确保标题靠左显示
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
:class="['tab-item', { 'active': activeTabIndex === index }]"
|
||||
@click="setActiveTab(index)"
|
||||
>
|
||||
{{ panel.title }}
|
||||
<div class="tab-title">{{ panel.title }}</div>
|
||||
<button
|
||||
class="button-icon p-[2px] rounded hover:opacity-100 opacity-80"
|
||||
@click.stop="closeTab(panel.id)"
|
||||
@@ -115,6 +115,15 @@ const closeTab = (tabId) => {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.tab-title {
|
||||
text-align: left;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
background: #ffffff;
|
||||
border: 1px solid #c7d2ea;
|
||||
@@ -144,7 +153,6 @@ const closeTab = (tabId) => {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
order: 1;
|
||||
}
|
||||
|
||||
/* 确保在活动标签页中的按钮样式正确 */
|
||||
|
||||
Reference in New Issue
Block a user