|
@@ -3,7 +3,7 @@
|
|
|
<div class="counsel-header">
|
|
|
<span>会话<i class="ai el-icon-chat-dot-round"></i></span>
|
|
|
</div>
|
|
|
- <div class="counsel-chats">
|
|
|
+ <div class="counsel-chats" ref="scrollContainer" @scroll="handleScroll">
|
|
|
<div class="counsel-left flex">
|
|
|
<div class="header-img">
|
|
|
<img src="/static/images/aiModel/kefu.png" />
|
|
@@ -264,6 +264,17 @@ export default {
|
|
|
this.$emit("close");
|
|
|
}
|
|
|
},
|
|
|
+ handleScroll(event) {
|
|
|
+ const { scrollTop, scrollHeight, clientHeight } = event.target;
|
|
|
+ // 检查是否滚动到底部
|
|
|
+ if (scrollTop + clientHeight >= scrollHeight) {
|
|
|
+ // 滚动到最底部时的逻辑处理
|
|
|
+ console.log("已滚动到最底部");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ scrollToBottom() {
|
|
|
+ this.$refs.scroll.scrollTop = this.$refs.scroll.scrollHeight;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|