Skip to content

Commit 5482c58

Browse files
committed
publish 3.1.2
1 parent 9d26cfe commit 5482c58

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ A web-side command line plugin built by `Vue`, supports multiple message formats
2020
* Support ↑ ↓ key history command toggle
2121
* Support full-screen display
2222
* Support window drag
23+
* Support for multi-line text editing
2324
* Support custom command library and search for help tips, use the `Tab` key to quickly fill
2425
* Support User inputting filter
2526
* Support API interface: execute command, push message, simulate drag and drop, get position, full screen, modify context, etc.
@@ -141,14 +142,15 @@ Terminal tag supports attribute parameter table.
141142

142143
Terminal tag support event table
143144

144-
| Event name | Description | Callback arguments |
145-
|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------|
146-
| execCmd | Fired when a custom command is executed. `success` and `failed` are callback functions, **must call one of the two callbacks before echoing!**, the meaning of the `success` callback parameter is described below, and the `failed` callback parameter is a string. | `(cmdKey, command, success, failed, name)` |
147-
| beforeExecCmd | Triggered before the user presses Enter to execute the command. | `(cmdKey, command, name)` |
148-
| onKeydown | When the cursor focus is obtained, press any keyboard to trigger. | `(event, name)` |
149-
| onClick | Triggered when the user clicks the button, the parameter `key` is the unique identification of the button, there are buttons: `close`, `minScreen`, `fullScreen`, `title`. | `(key, name)` |
150-
| initBefore | Lifecycle function, triggered before plugin initialization. | `(name)` |
151-
| initComplete | Lifecycle function, triggered after plugin initialization is complete. | `(name)` |
145+
| Event name | Description | Callback arguments |
146+
|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------|
147+
| execCmd | Fired when a custom command is executed. `success` and `failed` are callback functions, **must call one of the two callbacks before echoing!**, the meaning of the `success` callback parameter is described below, and the `failed` callback parameter is a string. | `(cmdKey, command, success, failed, name)` |
148+
| beforeExecCmd | Triggered before the user presses Enter to execute the command. | `(cmdKey, command, name)` |
149+
| onKeydown | When the cursor focus is obtained, press any keyboard to trigger. | `(event, name)` |
150+
| onClick | Triggered when the user clicks the button, the parameter `key` is the unique identification of the button, there are buttons: `close`, `minScreen`, `fullScreen`, `title`. | `(key, name)` |
151+
| initBefore | Lifecycle function, triggered before plugin initialization. | `(name)` |
152+
| initComplete | Lifecycle function, triggered after plugin initialization is complete. | `(name)` |
153+
| tabKeyHandler | The logic processing method when the user types the Tab key can be used in conjunction with the `helpCmd` slot. | `(event)` |
152154

153155
**Special note**: The `success` callback parameter of `execCmd` supports multiple data types, and the execution logic of different data types will be different:
154156

@@ -172,6 +174,7 @@ Terminal supports the following custom slots, this feature is supported in `2.0.
172174
| code | { message } | Custom `code` type message. |
173175
| html | { message } | Custom `html` type message. |
174176
| flash | { content } | Custom flash style |
177+
| helpCmd | { item } | Custom command search prompt style |
175178

176179
example:
177180

README_ZH.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,15 @@ terminal标签支持的属性参数表
141141

142142
terminal标签支持的事件表
143143

144-
| 事件名称 | 说明 | 回调参数 |
145-
|----------------|-------------------------------------------------------------------------------------------------------|--------------------------------------------|
146-
| execCmd | 执行自定义命令时触发。`success``failed`为回调函数,**必须调用两个回调其中之一才会回显!**,其中`success`回调参数含义见下方说明,`failed`回调参数为一个string | `(cmdKey, command, success, failed, name)` |
147-
| beforeExecCmd | 用户敲下回车之后执行命令之前触发 | `(cmdKey, command, name)` |
148-
| onKeydown | 当获取命令输入光标焦点时,按下任意键触发 | `(event, name)` |
149-
| onClick | 用户点击按钮时触发,参数`key`为按钮唯一识别,已有按钮:close、minScreen、fullScreen、title | `(key, name)` |
150-
| initBefore | 生命周期函数,插件初始化之前触发 | `(name)` |
151-
| initComplete | 生命周期函数,插件初始化完成之后触发 | `(name)` |
144+
| 事件名称 | 说明 | 回调参数 |
145+
|-----------------|-------------------------------------------------------------------------------------------------------|--------------------------------------------|
146+
| execCmd | 执行自定义命令时触发。`success``failed`为回调函数,**必须调用两个回调其中之一才会回显!**,其中`success`回调参数含义见下方说明,`failed`回调参数为一个string | `(cmdKey, command, success, failed, name)` |
147+
| beforeExecCmd | 用户敲下回车之后执行命令之前触发 | `(cmdKey, command, name)` |
148+
| onKeydown | 当获取命令输入光标焦点时,按下任意键触发 | `(event, name)` |
149+
| onClick | 用户点击按钮时触发,参数`key`为按钮唯一识别,已有按钮:close、minScreen、fullScreen、title | `(key, name)` |
150+
| initBefore | 生命周期函数,插件初始化之前触发 | `(name)` |
151+
| initComplete | 生命周期函数,插件初始化完成之后触发 | `(name)` |
152+
| tabKeyHandler | 用户键入Tab键时的逻辑处理方法,可配合`helpCmd`这个slot使用 | `(event)` |
152153

153154
**特别说明**:execCmd的`success`回调参数支持多种数据类型,不同数据类型执行逻辑也会不同:
154155

@@ -172,6 +173,7 @@ Terminal支持以下自定义插槽,此功能在`2.0.11`和`3.0.8`版本及之
172173
| code | { message } | 自定义`code`类型消息 |
173174
| html | { message } | 自定义`html`类型消息 |
174175
| flash | { content } | 自定义实时回显样式 |
176+
| helpCmd | { item } | 自定义命令搜索提示样式 |
175177

176178
example:
177179

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": "3.1.1",
3+
"version": "3.1.2",
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)