Closed ljd1995 closed 2 years ago
I used the backend to print the log to verify the problem, and found that the websocket that sent the command was inconsistent, and the terminal that wrote the command seemed to be the last terminal.
Looks like a scoping issue of your terminal.value
, prolly getting overridden by the second terminal setup (just a guess, idk vue).
This is not an xterm.js issue, please refer to vue documentation how to setup this correctly.
Details
Steps to reproduce
Hello, I got exception when i build multi terminal using xterm.js, when a single page has more than one terminal, the terminal send data will always be on the last terminal
First, I use vue3 composition api to build my project.
I have 2 terminal on a web page, main page code is
term1.vue code is
term2.vue code is
And backend I use Python FastAPI and paramiko to build websocket endpoint
In the gif, I input command in left terminal(term1.vue), but command has send to right terminal(term2.vue), I can't understand why this problem occurs,please give me some help