fix(webui): handle history wheel on preview container (#6972)

This commit is contained in:
Rainor_da!
2026-03-28 21:38:27 +08:00
committed by GitHub
parent 971bcbad10
commit 77419e0bc7

View File

@@ -198,7 +198,9 @@
</div>
<!-- 预览模式 - 聊天界面 -->
<div v-else class="conversation-messages-container" style="background-color: var(--v-theme-surface);">
<div v-else class="conversation-messages-container" style="background-color: var(--v-theme-surface);"
ref="messagesContainer"
@wheel.prevent="onContainerWheel">
<!-- 空对话提示 -->
<div v-if="conversationHistory.length === 0" class="text-center py-5">
<v-icon size="48" color="grey">mdi-chat-remove</v-icon>
@@ -1052,6 +1054,13 @@ export default {
return parts;
},
// Manually handle wheel scrolling inside the dialog preview container.
onContainerWheel(event) {
const el = this.$refs.messagesContainer;
if (!el) return;
el.scrollTop += event.deltaY;
},
// 从内容中提取文本(保留用于其他用途)
extractTextFromContent(content) {
if (typeof content === 'string') {