From 3b1c3067a09faca3156551346552856c33237248 Mon Sep 17 00:00:00 2001 From: garel Date: Mon, 12 Oct 2020 23:58:34 +0200 Subject: [PATCH] TerminalDoc update The TerminalService does not have $on, $off, and $emit properties. I believe this comes from the ts declaration, but in plain js, this produces an error. Even in the TerminalDemo.vue, the TerminalService uses the event listeners without the $ sign. This should be fixed, because its misleading. --- src/views/terminal/TerminalDoc.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/terminal/TerminalDoc.vue b/src/views/terminal/TerminalDoc.vue index 49c6e9ce3..5c4cb349f 100755 --- a/src/views/terminal/TerminalDoc.vue +++ b/src/views/terminal/TerminalDoc.vue @@ -176,14 +176,14 @@ export default { response = "Unknown command: " + command; } - TerminalService.$emit('response', response); + TerminalService.emit('response', response); } }, mounted() { - TerminalService.$on('command', this.commandHandler); + TerminalService.on('command', this.commandHandler); }, beforeUnmount() { - TerminalService.$off('command', this.commandHandler); + TerminalService.off('command', this.commandHandler); } } @@ -216,4 +216,4 @@ p { - \ No newline at end of file +