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);