Q & A
For more questions, please go to issue to raise them or find answers.
Can it be used with WebSocket?
Yes, the terminal plugin is just a tool responsible for display processing, it belongs to the "display layer", WebSocket is a communication protocol, it belongs to the "network layer", they do not conflict, you can use any network protocol with the plug-in, Http, WebSocket, custom RPC and so on.
Can an SSH client be implemented?
Unfortunately, this cannot be fully implemented. This plugin is a tool displayed by front-end control, SSH belongs to back-end control, and their underlying implementation logic is different.
However, if your usage scenario is just a simple command mode, such as executing ls
to get the results from the server and then displaying static data, this is possible. The plug-in implements the processing of static ANSI color control codes. If it is htop, vim, etc. with other ANSI control codes of keyboard, mouse, and window behaviors, this plug-in cannot support it. Such dynamic control codes will be filtered out by the plugin.
Why does it not work after setting the attribute or event name to hump-case?
- Issue: #41
- Reason: Vue officially does not recommend using hump case names when emitting events. In order to unify the code style of Vue2 and Vue3, the plugin removes all external camel case names.
- Solution: Use
kebab-case
naming conventions, e.g., change@execCmd
to@exec-cmd
Undefined appears when pushing messages, and the content cannot be displayed normally
- Issue: #43
- Reason: This is caused by the official modification of vue's
slotRender
in2.6.13
version. For details, see: vuejs/vue#12153. This terminal plug-in is compiled in the2.6.14
environment. If you use vue and vue-template-compiler lower than this version in your project, the slot position will be undefined. - Solution: Upgrade the versions of vue and vue-template-compiler in the project to 2.6.13 or above, such as 2.6.14
Can't paste the clipboard contents with the right mouse button?
Right-click to read the clipboard contents and paste them into Terminal. Your web page must meet all of the following conditions:
- The protocol of the webpage is
https
, or the domain name of the webpage islocalhost
or127.0.0.1
. - Obtain user consent to read the clipboard.
- The browser allows the execution of javascript scripts (usually enabled)
If your web page does not meet the above conditions for some reason, you can use the native shortcut ctrl/command + v
to paste the contents of the clipboard.
How to enter a line break in the command line?
Use the shortcut ctrl + enter
to enter a line break. This feature is supported since 2.3.1
and 3.3.1
(inclusive).