From e8baf235f50dc1657c95c1a10a4eb97c552159ad Mon Sep 17 00:00:00 2001 From: vapao Date: Thu, 14 Jul 2022 14:43:13 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8Dweb=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=8C=BA=E5=9F=9F=E6=9C=AA=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/ssh/Terminal.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spug_web/src/pages/ssh/Terminal.js b/spug_web/src/pages/ssh/Terminal.js index 3fabfe1..cea1d1c 100644 --- a/spug_web/src/pages/ssh/Terminal.js +++ b/spug_web/src/pages/ssh/Terminal.js @@ -39,7 +39,7 @@ function WebSSH(props) { socket.onopen = () => { term.write('ok') term.focus(); - fitPlugin.fit(); + fitTerminal(); }; socket.onclose = e => { setTimeout(() => term.write('\r\n\r\n\x1b[31mConnection is closed.\x1b[0m\r\n'), 200) @@ -63,7 +63,6 @@ function WebSSH(props) { term.setOption('fontSize', gStore.terminal.fontSize) term.setOption('fontFamily', gStore.terminal.fontFamily) term.setOption('theme', gStore.terminal.styles) - fitTerminal() // eslint-disable-next-line react-hooks/exhaustive-deps }, [gStore.terminal])