@!!!破碎问题用延时解决!!!

This commit is contained in:
2026-03-21 21:27:17 +08:00
parent 7e429c01c9
commit 9179b7989e

View File

@@ -231,15 +231,13 @@
term.loadAddon(fitAddon);
term.open(terminalContainer);
requestAnimationFrame(() => {
requestAnimationFrame(() => {
fitAddon.fit();
if (ws && ws.readyState === WebSocket.OPEN) {
ws.send(`\x1b[8;${term.rows};${term.cols}t`);
}
term.focus();
});
});
setTimeout(() => {
fitAddon.fit();
if (ws && ws.readyState === WebSocket.OPEN) {
ws.send(`\x1b[8;${term.rows};${term.cols}t`);
}
term.focus();
}, 100);
ws.binaryType = 'arraybuffer';