From e2b5bb3b70e121172d918c6f8498ba843ae4a211 Mon Sep 17 00:00:00 2001 From: wancat Date: Fri, 5 Apr 2024 23:04:51 +0800 Subject: [PATCH] fix: terminal type --- app/src/utils/terminal.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/utils/terminal.ts b/app/src/utils/terminal.ts index cbcfd1b..337047a 100644 --- a/app/src/utils/terminal.ts +++ b/app/src/utils/terminal.ts @@ -8,7 +8,6 @@ class SocketTerminal { constructor(rows: number, cols: number) { this.term = new Terminal({ - rendererType: 'canvas', // 渲染类型 rows, // 行数 cols, // 不指定行数,自动回车后光标从下一行开始 convertEol: true, // 启用时,光标将设置为下一行的开头 @@ -16,9 +15,11 @@ class SocketTerminal { disableStdin: false, // 是否应禁用输入 // cursorStyle: "underline", //光标样式 cursorBlink: true, // 光标闪烁 - foreground: '#ECECEC', // 字体 - background: '#000000', // 背景色 - cursor: 'help', // 设置光标 + theme: { + foreground: '#ECECEC', // 字体 + background: '#000000', // 背景色 + cursor: 'help', // 设置光标 + }, fontSize: 18, fontWeight: 'normal', })