修复浮动面板中TabPage内Panel未显示问题:1. 修改TabPage支持slot渲染;2. 修复DockLayout中showTitleBar属性设置
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="tab-page">
|
||||
<!-- Tab标签栏 -->
|
||||
<div class="tab-header">
|
||||
<!-- 当tabs为空时,不显示标签栏,直接渲染slot内容 -->
|
||||
<div v-if="tabs.length > 0" class="tab-header">
|
||||
<div
|
||||
v-for="(tab, index) in tabs"
|
||||
:key="tab.id"
|
||||
@@ -19,12 +19,16 @@
|
||||
</div>
|
||||
<!-- Tab页内容区域 -->
|
||||
<div class="tab-content">
|
||||
<div v-for="(tab, index) in tabs" :key="tab.id" :class="['tab-panel', { 'active': activeTabIndex === index }]">
|
||||
<component :is="tab.component" v-bind="tab.props"></component>
|
||||
</div>
|
||||
<div v-if="tabs.length === 0" class="tab-empty">
|
||||
<slot name="empty">无标签页</slot>
|
||||
</div>
|
||||
<!-- 当有tabs时,渲染tabs内容 -->
|
||||
<template v-if="tabs.length > 0">
|
||||
<div v-for="(tab, index) in tabs" :key="tab.id" :class="['tab-panel', { 'active': activeTabIndex === index }]">
|
||||
<component :is="tab.component" v-bind="tab.props"></component>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 当没有tabs或tabs为空时,渲染slot内容 -->
|
||||
<template v-else>
|
||||
<slot></slot>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user