From 91569b6a3562dc5d5520d69553fba75951b94c2d Mon Sep 17 00:00:00 2001 From: vapao Date: Thu, 9 Dec 2021 08:36:33 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E4=BC=98=E5=8C=96=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/deploy/request/Ext1Console.js | 4 ++-- spug_web/src/pages/deploy/request/OutView.js | 16 +++++++++------- .../src/pages/deploy/request/index.module.less | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/spug_web/src/pages/deploy/request/Ext1Console.js b/spug_web/src/pages/deploy/request/Ext1Console.js index b8473d1..9f75356 100644 --- a/spug_web/src/pages/deploy/request/Ext1Console.js +++ b/spug_web/src/pages/deploy/request/Ext1Console.js @@ -130,7 +130,7 @@ function Ext1Console(props) { )} - + diff --git a/spug_web/src/pages/deploy/request/OutView.js b/spug_web/src/pages/deploy/request/OutView.js index 3f384a7..5e692c6 100644 --- a/spug_web/src/pages/deploy/request/OutView.js +++ b/spug_web/src/pages/deploy/request/OutView.js @@ -11,13 +11,15 @@ function OutView(props) { const el = useRef() useEffect(() => { - const fitPlugin = new FitAddon() - const term = new Terminal({disableStdin: true}) - term.loadAddon(fitPlugin) - term.setOption('theme', {background: '#fff', foreground: '#000', selection: '#999'}) - term.open(el.current) - props.setTerm(term) - fitPlugin.fit() + setTimeout(() => { + const fitPlugin = new FitAddon() + const term = new Terminal({disableStdin: true}) + term.loadAddon(fitPlugin) + term.setOption('theme', {background: '#fff', foreground: '#000', selection: '#999'}) + term.open(el.current) + fitPlugin.fit() + props.setTerm(term) + }, 100) // eslint-disable-next-line react-hooks/exhaustive-deps }, []) diff --git a/spug_web/src/pages/deploy/request/index.module.less b/spug_web/src/pages/deploy/request/index.module.less index 925cd16..e3d13df 100644 --- a/spug_web/src/pages/deploy/request/index.module.less +++ b/spug_web/src/pages/deploy/request/index.module.less @@ -82,7 +82,7 @@ } .step { - width: 600px; + flex: 1; margin-right: 16px; }