@!!!破碎问题用延时解决!!!
This commit is contained in:
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user