fix: 移除无用的滚动事件处理和相关方法,优化组件加载逻辑

This commit is contained in:
yangzhe 2025-07-11 14:34:12 +08:00
parent 1a05539731
commit cceb6eed43
1 changed files with 3 additions and 25 deletions

View File

@ -84,8 +84,6 @@
scroll-with-animation
:scroll-top="scrollTop"
:show-scrollbar="true"
@scrolltoupper="loadMoreMessages"
@scroll="onScroll"
>
<!-- 头部卡片 -->
<!-- 后端让先注释 -->
@ -380,16 +378,7 @@ export default {
},
},
onLoad() {},
mounted() {
this.$nextTick(() => {
this.scrollToBottom();
});
},
updated() {
this.$nextTick(() => {
this.scrollToBottom();
});
},
mounted() {},
methods: {
handleLeftClick() {
this.$u.api.GetConversationPage().then((res) => {
@ -415,16 +404,6 @@ export default {
});
},
selectChatItem(index) {
this.activeIndex = index;
},
loadMoreMessages() {
//
console.log("加载更多历史消息");
},
onScroll(event) {
//
},
scrollToBottom() {
// 使nextTickDOM
this.$nextTick(() => {
@ -434,6 +413,7 @@ export default {
.select(".chat-content")
.boundingClientRect((data) => {
if (data) {
console.log("data", data);
//
const scrollHeight = data.height;
// 100px
@ -558,8 +538,6 @@ export default {
//
return timeA - timeB;
});
this.scrollToBottom();
});
},
@ -588,7 +566,7 @@ page {
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: 0 88rpx;
// overflow: hidden; /* hidden */
background-attachment: fixed;
}
.home-container {