修复:全员清屏 DOM 选择器 ID 错误
- getElementById('say') → getElementById('chat-messages-container')
- getElementById('say2') → getElementById('chat-messages-container2')
- 这是清屏事件收到但页面无反应的根本原因
This commit is contained in:
@@ -526,12 +526,12 @@
|
||||
console.log('收到全员清屏事件:', e);
|
||||
const operator = e.operator;
|
||||
|
||||
// 清除公聊窗口(say1)所有消息
|
||||
const say1 = document.getElementById('say');
|
||||
// 清除公聊窗口所有消息
|
||||
const say1 = document.getElementById('chat-messages-container');
|
||||
if (say1) say1.innerHTML = '';
|
||||
|
||||
// 清除包厢窗口(say2)中非悄悄话的消息
|
||||
const say2 = document.getElementById('say2');
|
||||
// 清除包厢窗口中非悄悄话的消息
|
||||
const say2 = document.getElementById('chat-messages-container2');
|
||||
if (say2) {
|
||||
const items = say2.querySelectorAll('.msg-line');
|
||||
items.forEach(item => {
|
||||
|
||||
Reference in New Issue
Block a user