From abcef1fe24cf1613ebffa0bf5b409cc9c9c77dfe Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 29 Jun 2020 18:47:48 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9Aresize=E6=97=B6=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E9=BB=91=E7=AA=97=E5=8F=A3=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/cli/console.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/cli/console.vue b/nezha-fronted/src/components/cli/console.vue index 51c991410..eedda39b5 100644 --- a/nezha-fronted/src/components/cli/console.vue +++ b/nezha-fronted/src/components/cli/console.vue @@ -72,7 +72,10 @@ export default { } //调整终端可视区域高度 document.getElementsByClassName('xterm-screen')[this.idIndex].style.height=`${consoleHeigt}px`; - this.term.resize(parseInt(cols),(parseInt(rows)-this.minRow)); + // this.term.resize(parseInt(cols),(parseInt(rows)-this.minRow)); + this.$nextTick(()=>{// 解决进入全屏和退出全屏是底部隐藏 + this.setFontSize(this.fontSize); + }) }, resizeServiceConsole(){ const consoleBox = document.getElementById('ternimalContainer'+this.idIndex); @@ -290,6 +293,9 @@ export default { this.term.attach(this.terminalSocket); this.term._initialized = true; this.term.fit();//自适应大小(使终端的尺寸和几何尺寸适合于终端容器的尺寸) 只是width + this.$nextTick(()=>{// 解决进入全屏和退出全屏是底部隐藏 + this.setFontSize(this.fontSize); + }) }, closeSocket(){