diff --git a/nezha-fronted/src/components/cli/console.vue b/nezha-fronted/src/components/cli/console.vue index 9df5f5955..6be2ef277 100644 --- a/nezha-fronted/src/components/cli/console.vue +++ b/nezha-fronted/src/components/cli/console.vue @@ -58,7 +58,7 @@ export default { }, resize(consoleHeigt,consoleWidth){ this.resizeConsole(consoleHeigt,consoleWidth); - this.resizeServiceConsole(); + this.resizeServiceConsole(consoleHeigt); }, resizeConsole(consoleHeigt,consoleWidth){ //调整终端容器高度 @@ -325,16 +325,17 @@ export default { document.getElementsByClassName('xterm-screen')[this.idIndex].style.height=height+'px' this.$nextTick(()=>{ this.term.resize(this.term.cols,this.term.rows); + this.$post('terminal/resize',winStyle).then(response => { + if (response.code === 200) { + this.term.fit(); + //this.term.scrollToBottom(); + } else { + this.$message.error(response.msg); + } + }); }); // alert(JSON.stringify(winStyle)); - this.$post('terminal/resize',winStyle).then(response => { - if (response.code === 200) { - this.term.fit(); - //this.term.scrollToBottom(); - } else { - this.$message.error(response.msg); - } - }); + // console.log(winStyle) }