|
@@ -3,7 +3,7 @@
|
|
|
<div class="counsel-header">
|
|
|
<span>会话<i class="ai el-icon-chat-dot-round"></i></span>
|
|
|
</div>
|
|
|
- <div class="counsel-chats" ref="scrollContainer" @scroll="handleScroll">
|
|
|
+ <div class="counsel-chats" ref="scrollRef">
|
|
|
<div class="counsel-left flex">
|
|
|
<div class="header-img">
|
|
|
<img src="/static/images/aiModel/kefu.png" />
|
|
@@ -101,6 +101,7 @@ export default {
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {},
|
|
|
+
|
|
|
methods: {
|
|
|
initSpeech() {
|
|
|
// 检查浏览器是否支持SpeechRecognition
|
|
@@ -264,16 +265,12 @@ 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;
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ questionList() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.scrollRef.scrollTop = this.$refs.scrollRef.scrollHeight;
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|