mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-25 00:23:53 +08:00
update:优化未开启记忆的聊天记录按钮样式
This commit is contained in:
@@ -26,8 +26,12 @@
|
||||
<div class="settings-btn" @click="handleDeviceManage">
|
||||
设备管理({{ device.deviceCount }})
|
||||
</div>
|
||||
<div class="settings-btn" @click="handleChatHistory">
|
||||
聊天记录
|
||||
<div class="settings-btn" @click="handleChatHistory"
|
||||
:class="{ 'disabled-btn': device.memModelId === 'Memory_nomem' }">
|
||||
<el-tooltip v-if="device.memModelId === 'Memory_nomem'" content="未开启记忆" placement="top">
|
||||
<span>聊天记录</span>
|
||||
</el-tooltip>
|
||||
<span v-else>聊天记录</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="version-info">
|
||||
@@ -77,6 +81,9 @@ export default {
|
||||
this.$router.push({ path: '/device-management', query: { agentId: this.device.agentId } });
|
||||
},
|
||||
handleChatHistory() {
|
||||
if (this.device.memModelId === 'Memory_nomem') {
|
||||
return
|
||||
}
|
||||
this.$emit('chat-history', { agentId: this.device.agentId, agentName: this.device.agentName })
|
||||
}
|
||||
}
|
||||
@@ -120,6 +127,12 @@ export default {
|
||||
color: #979db1;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.disabled-btn {
|
||||
background: #e6e6e6;
|
||||
color: #999;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user