From b372c7f823d5c1bb86e6157d8741a5cf0931b1e4 Mon Sep 17 00:00:00 2001 From: "will.zhang" Date: Tue, 31 Dec 2024 11:16:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=91=BD=E4=BB=A4=E8=A1=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E8=BE=93=E5=85=A5=E4=B8=A4=E6=AC=A1=E5=9B=9E?= =?UTF-8?q?=E8=BD=A6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Device/DeviceAdbShellDialog.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Device/DeviceAdbShellDialog.vue b/src/components/Device/DeviceAdbShellDialog.vue index e4c852f4..56676bac 100644 --- a/src/components/Device/DeviceAdbShellDialog.vue +++ b/src/components/Device/DeviceAdbShellDialog.vue @@ -25,7 +25,12 @@ watch(() => visible.value, async (v) => { convertEol: true, }) term.onData((data) => { - shellController.send(data); + if (data === '\r') { + // 发送回车 + shellController.send('\r\n'); + } else { + shellController.send(data); + } }) const fitAddon = new FitAddon(); term.loadAddon(fitAddon);