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.
pull/548/head
garel 2020-10-12 23:58:34 +02:00 committed by GitHub
parent c8be313802
commit 3b1c3067a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -176,14 +176,14 @@ export default {
response = "Unknown command: " + command; response = "Unknown command: " + command;
} }
TerminalService.$emit('response', response); TerminalService.emit('response', response);
} }
}, },
mounted() { mounted() {
TerminalService.$on('command', this.commandHandler); TerminalService.on('command', this.commandHandler);
}, },
beforeUnmount() { beforeUnmount() {
TerminalService.$off('command', this.commandHandler); TerminalService.off('command', this.commandHandler);
} }
} }
@ -216,4 +216,4 @@ p {
</TabPanel> </TabPanel>
</TabView> </TabView>
</div> </div>
</template> </template>