update: Add conditional rendering for delete button and user info button in ChatHeader for improved functionality

This commit is contained in:
Lexcubia 2025-04-20 21:02:30 +08:00
parent d860176c37
commit b0d9c7f521
1 changed files with 2 additions and 3 deletions

View File

@ -20,7 +20,7 @@
<HistoryButton v-if="settingsStore.sidebarCollapsed" :icon-only="false" class="title-history-btn" />
</div>
<div class="actions">
<el-tooltip content="删除会话" placement="bottom">
<el-tooltip content="删除会话" placement="bottom" v-if="chatStore.conversationId">
<el-button
class="action-btn delete-btn"
:icon="Delete"
@ -38,13 +38,12 @@
>
</el-button>
</el-tooltip>
<el-tooltip :content="hasBackground ? '客户背景' : '暂无客户背景信息'" placement="bottom">
<el-tooltip :content="hasBackground ? '客户背景' : '暂无客户背景信息'" placement="bottom" v-if="hasBackground">
<el-button
class="action-btn"
:icon="User"
@click="showUserInfo = true"
text
:disabled="!hasBackground"
>
</el-button>
</el-tooltip>