NEZ-2446 feat:web terminal 样式调整

This commit is contained in:
zhangyu
2022-12-14 17:36:52 +08:00
parent 44ef5ac612
commit 69b4faf3d2
7 changed files with 84 additions and 19 deletions

View File

@@ -249,6 +249,7 @@ export default {
closeSocket () {
if (this.terminalSocket) {
this.terminalSocket.close()
this.terminalSocket = ''
}
if (this.term) {
this.term.destroy()
@@ -305,10 +306,12 @@ export default {
})
},
enterStr (message) {
this.terminalSocket.send(message)
setTimeout(()=>{
this.terminalSocket.send('\n')
}, 100)
if (this.terminalSocket && this.terminal.isLogin) {
this.terminalSocket.send(message)
setTimeout(()=>{
this.terminalSocket.send('\n')
}, 100)
}
}
},
mounted () {