Skip to content

Commit 251a542

Browse files
committed
publish 2.2.3
1 parent db3837b commit 251a542

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ Terminal tag supports attribute parameter table.
164164
| push-message-before | A hook function that fires before the push message is displayed. | function | function(message, name) |
165165
| log-size-limit | Limit the maximum number of displayed logs. | number | 200 |
166166
| enable-default-command | Enable default command handler. | boolean | true |
167+
| line-space | Log line height, in `px`. | number | 15 |
168+
| cursor-style | Cursor style, optional values: `block`, `underline`, `bar`, `none` | string | block |
169+
| cursor-blink | Whether to turn on cursor blinking. | boolean | true |
170+
| enable-fold | Whether to enable the log folding function. | boolean | true |
171+
| enable-hover-stripe | Whether the logs in the same group are highlighted when the mouse hovers. | boolean | false |
167172

168173
## Events
169174

@@ -426,6 +431,22 @@ TerminalApi.clearLog('my-terminal')
426431
TerminalApi.clearLog('my-terminal', true)
427432
```
428433

434+
### getCommand()
435+
436+
Get the command currently being entered.
437+
438+
```js
439+
TerminalApi.getCommand('my-terminal')
440+
```
441+
442+
### setCommand()
443+
444+
Set the command currently being entered.
445+
446+
```js
447+
TerminalApi.setCommand('my-terminal', "customCmd -a hello")
448+
```
449+
429450
## Message
430451

431452
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.

README_ZH.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ terminal标签支持的属性参数表
160160
| push-message-before | 在推送消息显示之前触发的钩子函数 | function | function(message, name) |
161161
| log-size-limit | 限制显示日志的最大条数 | number | 200 |
162162
| enable-default-command | 控制是否生效默认指令 | boolean | true |
163+
| line-space | 日志行高,单位px | number | 15 |
164+
| cursor-style | 光标样式,可选值:`block`, `underline`, `bar`, `none` | string | block |
165+
| cursor-blink | 是否打开光标闪烁 | boolean | true |
166+
| enable-fold | 是否打开日志折叠功能 | boolean | true |
167+
| enable-hover-stripe | 同一组的日志在鼠标hover时是否高亮显示 | boolean | false |
163168

164169
## Events
165170

@@ -422,6 +427,22 @@ TerminalApi.clearLog('my-terminal')
422427
TerminalApi.clearLog('my-terminal', true)
423428
```
424429

430+
### getCommand()
431+
432+
获取当前正在输入的指令
433+
434+
```js
435+
TerminalApi.getCommand('my-terminal')
436+
```
437+
438+
### setCommand()
439+
440+
修改当前正在输入的指令
441+
442+
```js
443+
TerminalApi.setCommand('my-terminal', "customCmd -a hello")
444+
```
445+
425446
## 消息对象
426447

427448
本插件定义了消息对象,任何一个需要被以记录的形式显示在Terminal上的信息都是一个消息对象,`exec-cmd`事件的`success()`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-web-terminal",
3-
"version": "2.2.2",
3+
"version": "2.2.3",
44
"description": "A lightweight and powerful web terminal plugin, suitable for vue3. 轻量、功能强大的网页端Terminal插件,适配vue3",
55
"license": "Apache-2.0",
66
"private": false,

0 commit comments

Comments
 (0)