You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| context-suffix | Context text suffix. | string |\>|
153
-
| title | The title displayed in the header. | string | vue-web-terminal |
154
-
| show-header | Whether to display the header, this switch will affect the drag and [drop](#Drag) function. Only when the header is displayed can the drag and drop function provided by default be used. | boolean | true |
155
-
| init-log | The log displayed when Terminal is initialized. It is an array composed of [Message](#Message), `null` is not displayed. | array | / |
156
-
| auto-help | Whether to enable the command line automatic search prompt function. | boolean | true |
157
-
| enable-example-hint | Whether to show sample prompts, provided that `auto-help` is enabled. | boolean | true |
158
-
| command-store | Customized command library, the search prompt function will scan this library, see [Command Definition](#Command)| array |[Local Commands](#Local)|
159
-
| command-store-sort | Command line library sorting function, the display collation of the custom command library. | function | function(a,b) |
160
-
| input-filter | Custom input filter, the return value is the filtered string, must be plain text, no html tags. | function | function(当前输入字符char, 输入框内字符串value, input事件event) |
161
-
| drag-conf | Drag and drop window configuration items. **If you do not configure it, the parent element will be filled with 100%, and the window width and height are equal to the width and height of the parent element.**| object |[Drag](#Drag)|
162
-
| command-formatter | Command display formatting function, pass in the current command and return a new command, support html. If not set, the internally defined highlight style will be used. | function | function(cmd) |
163
-
| tab-key-handler | The logic processing method when the user types the Tab key can be used in conjunction with the `helpCmd` slot. | function | function(event) |
164
-
| search-handler | User-defined command search prompt implementation, the callback needs to resolve a command object, the specific format see [Command Definition format](#Command), can be used with `helpCmd` this slot | function | function(commandStore, key, callback) |
| context-suffix | Context text suffix. | string |\>|
151
+
| title | The title displayed in the header. | string | vue-web-terminal |
152
+
| show-header | Whether to display the header, this switch will affect the drag and [drop](#Drag) function. Only when the header is displayed can the drag and drop function provided by default be used. | boolean | true |
153
+
| init-log | The log displayed when Terminal is initialized. It is an array composed of [Message](#Message), `null` is not displayed. | array | / |
154
+
| auto-help | Whether to enable the command line automatic search prompt function. | boolean | true |
155
+
| enable-example-hint | Whether to show sample prompts, provided that `auto-help` is enabled. | boolean | true |
156
+
| command-store | Customized command library, the search prompt function will scan this library, see [Command Definition](#Command)| array |[Local Commands](#Local)|
157
+
| command-store-sort | Command line library sorting function, the display collation of the custom command library. | function | function(a,b) |
158
+
| input-filter | Custom input filter, the return value is the filtered string, must be plain text, no html tags. | function | function(当前输入字符char, 输入框内字符串value, input事件event) |
159
+
| drag-conf | Drag and drop window configuration items. **If you do not configure it, the parent element will be filled with 100%, and the window width and height are equal to the width and height of the parent element.**| object |[Drag](#Drag)|
160
+
| command-formatter | Command display formatting function, pass in the current command and return a new command, support html. If not set, the internally defined highlight style will be used. | function | function(cmd) |
161
+
| tab-key-handler | The logic processing method when the user types the Tab key can be used in conjunction with the `helpCmd` slot. | function | function(event, rewriteCallback(newCmd)) |
162
+
| search-handler | User-defined command search prompt implementation, the callback needs to resolve a command object, the specific format see [Command Definition format](#Command), can be used with `helpCmd` this slot | function | function(commandStore, key, callback) |
Clear the contents of the current screen, or clear history log.
437
+
438
+
```js
439
+
// clear screen log
440
+
TerminalApi.clearLog('my-terminal')
441
+
442
+
// clear history log
443
+
TerminalApi.clearLog('my-terminal', true)
444
+
```
445
+
435
446
## Message
436
447
437
448
This plugin defines a message object. Any information that needs to be displayed on the Terminal in the form of a record is a message object. It is used by the `success()` callback of the `exec-cmd` event and the `pushMessage` api.
0 commit comments