refactor: 日志堆栈描述调整

This commit is contained in:
meilin.huang
2023-09-03 13:04:29 +08:00
parent 899a3a8243
commit 649116a0b8
5 changed files with 14 additions and 27 deletions

View File

@@ -142,6 +142,8 @@ const onConnected = () => {
return true;
});
state.status = TerminalStatus.Connected;
// resize
sendResize(term.cols, term.rows);
// 注册窗口大小监听器
@@ -153,8 +155,6 @@ const onConnected = () => {
if (props.cmd) {
sendCmd(props.cmd + ' \r');
}
state.status = TerminalStatus.Connected;
};
// 自适应终端
@@ -220,7 +220,7 @@ enum MsgType {
}
const send = (msg: any) => {
socket.send(JSON.stringify(msg));
state.status == TerminalStatus.Connected && socket.send(JSON.stringify(msg));
};
const sendResize = (cols: number, rows: number) => {