Skip to content

Commit ae9ed9c

Browse files
author
weilei
committed
fix(core): 确保加载更多时loading元素可见
1 parent 3b9d058 commit ae9ed9c

File tree

1 file changed

+9
-3
lines changed
  • packages/element-ui-x/src/components/Conversations/src

1 file changed

+9
-3
lines changed

packages/element-ui-x/src/components/Conversations/src/main.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,7 @@
193193
export default {
194194
name: 'ElXConversations',
195195
196-
components: {
197-
ConversationsItem,
198-
},
196+
components: { ConversationsItem },
199197
200198
props: {
201199
items: {
@@ -549,6 +547,14 @@
549547
loadMoreData() {
550548
if (!this.loadMore) return;
551549
this.loadMore();
550+
// 确保loading元素可见
551+
this.$nextTick(() => {
552+
const scrollContainer = this.$refs.scrollContainer;
553+
if (scrollContainer) {
554+
// 滚动到底部,确保loading元素可见
555+
scrollContainer.scrollTop = scrollContainer.scrollHeight;
556+
}
557+
});
552558
},
553559
554560
scrollToTop() {

0 commit comments

Comments
 (0)