diff --git a/src/chat.js b/src/chat.js index de34354..3a1c945 100644 --- a/src/chat.js +++ b/src/chat.js @@ -233,7 +233,6 @@ export default class Chat { } // 如果和上一条消息是同一人, 且时间间隔小于1小时, 则向上合并 - console.log('添加一条消息', this.last, data) if (this.last && this.last.name === data.name && new Date(data.time).getTime() - new Date(this.last.time).getTime() < 1000 * 60 * 60) { this.last.item.querySelector('ul').appendChild(ListItem({ textContent: data.text })) this.last = { ...data, item: this.last.item } @@ -322,7 +321,6 @@ export default class Chat { ] })) if (scroll) { - console.log('滚动到底部') this.ul.scrollTop = this.ul.scrollHeight } // 记录到上一条消息