diff --git a/src/views/deepNine.vue b/src/views/deepNine.vue index 0fecb5d..e7c8202 100644 --- a/src/views/deepNine.vue +++ b/src/views/deepNine.vue @@ -3165,7 +3165,17 @@ watch( ); const scrollToTop = () => { - chatStore.dbqbScrollToTop = !chatStore.dbqbScrollToTop; + // 滚动到顶部锚点 + const topAnchor = document.getElementById("deepNine-top-anchor"); + if (topAnchor) { + topAnchor.scrollIntoView({ behavior: "smooth" }); + } else { + // 保留原有逻辑作为备用 + chatStore.dbqbScrollToTop = !chatStore.dbqbScrollToTop; + } + + // 通知父组件滚动到顶部 + emit('scrollToBottom'); }; // 添加渲染所有K线图的方法 @@ -3347,6 +3357,7 @@ onUnmounted(() => {