mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-28 11:52:46 +08:00
doc: 文档更新
This commit is contained in:
parent
11c0cb5adf
commit
60968ac334
@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
# 快捷命令 V2.1.0
|
||||
# 快捷命令 V2.1.1
|
||||
|
||||
[](https://github.com/fofolee/uTools-QuickerCommand/stargazers) [](https://github.com/fofolee/uTools-QuickerCommand/network/members) [](https://github.com/fofolee/uTools-QuickerCommand/blob/master/LICENSE) [](https://github.com/fofolee/uTools-QuickerCommand/blob/master/src/helps/CHANGELOG.md) [](https://yuanliao.info/d/424) [](https://yuanliao.info/d/424) [](https://yuanliao.info/d/424)
|
||||
|
||||
@ -79,8 +79,10 @@
|
||||
- 匹配呼出 uTools 前或唤出超级面板时的活动窗口,可以获取窗口的信息或文件夹路径作为变量
|
||||
- 复制/选中文件
|
||||
- 匹配拖入主输入框的文件或唤出超级面板时选中的文件,可以获取复制及选中的文件信息作为变量
|
||||
- 专业模式
|
||||
- 匹配 JSON 格式的配置,等效于插件开发中的`features.cmds`
|
||||
|
||||

|
||||

|
||||
|
||||
##### 环境
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
# 快捷命令 V2.1.0
|
||||
# 快捷命令 V2.1.1
|
||||
|
||||
[](https://github.com/fofolee/uTools-QuickerCommand/stargazers) [](https://github.com/fofolee/uTools-QuickerCommand/network/members) [](https://github.com/fofolee/uTools-QuickerCommand/blob/master/LICENSE) [](https://github.com/fofolee/uTools-QuickerCommand/blob/master/src/helps/CHANGELOG.md) [](https://yuanliao.info/d/424) [](https://yuanliao.info/d/424) [](https://yuanliao.info/d/424)
|
||||
|
||||
@ -79,8 +79,10 @@
|
||||
- 匹配呼出 uTools 前或唤出超级面板时的活动窗口,可以获取窗口的信息或文件夹路径作为变量
|
||||
- 复制/选中文件
|
||||
- 匹配拖入主输入框的文件或唤出超级面板时选中的文件,可以获取复制及选中的文件信息作为变量
|
||||
- 专业模式
|
||||
- 匹配 JSON 格式的配置,等效于插件开发中的`features.cmds`
|
||||
|
||||

|
||||

|
||||
|
||||
##### 环境
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,3 +1,12 @@
|
||||
## v2.1.1
|
||||
|
||||
- 在新建命令支持选择任意文件作为图标
|
||||
- 当选择 `.PNG` `.JPG` `.ICO` 等文件时,则以图片作为图标
|
||||
- 当选择 `.EXE` `.APP` 时,则以程序的图标作为图标
|
||||
- 当选择其他文件时,则以该文件的默认图标作为图标
|
||||
- 新增 `quickcommand.enterData` 用以获取进入插件时匹配的类型和数据,用法详见文档
|
||||
- 提供一个示例,作为`专业模式`下`配置`的默认值
|
||||
|
||||
## v2.1.0
|
||||
|
||||
### 新增功能
|
||||
@ -6,9 +15,9 @@
|
||||
- 添加`专业模式`的匹配选项
|
||||
- 可以通过 json 格式的配置实现同时匹配关键字、窗口、文件甚至图片
|
||||
- 可以实现指定文件数量、窗口类等
|
||||
- json 格式配置和插件开发的 features.cmds 一致
|
||||
- json 格式配置和插件开发的 `features.cmds` 一致
|
||||
- 配置处可以点击旁边的按钮全屏,方便填写 json 格式的配置
|
||||
- quickcommand.showTextAera 新增一个参数可以设置默认文本值
|
||||
- `quickcommand.showTextAera` 新增一个参数可以设置默认文本值
|
||||
|
||||

|
||||

|
||||
|
File diff suppressed because one or more lines are too long
@ -54,7 +54,10 @@
|
||||
|
||||
- 匹配拖入主输入框的文件或唤出超级面板时选中的文件,可以获取复制及选中的文件信息作为变量
|
||||
|
||||

|
||||
##### 专业模式
|
||||
- 匹配 JSON 格式的配置,等效于插件开发中的`features.cmds`
|
||||
|
||||

|
||||
|
||||
#### 环境
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -56,7 +56,7 @@ quickcommand.showButtonBox(['打开文件', '在文件管理器中定位', '复
|
||||
})
|
||||
```
|
||||
|
||||
####`showInputBox(placeHolders, title)`
|
||||
#### `showInputBox(placeHolders, title)`
|
||||
|
||||
- placeHolders: Array 每一个占位符对应一个输入框
|
||||
- title: String | undefined 对话框标题
|
||||
@ -89,7 +89,7 @@ quickcommand.showInputBox(["要替换的内容,两边加 / 使用正则", "替
|
||||
...
|
||||
})
|
||||
```
|
||||
####`showSelectList(selects, options)`
|
||||
#### `showSelectList(selects, options)`
|
||||
|
||||
- selects: Array 每一个元素对应一个列表选项
|
||||
- options: Array | undefined 列表的选项
|
||||
@ -192,7 +192,7 @@ quickcommand.setTimeout(()=>{
|
||||
}, 2000)
|
||||
```
|
||||
|
||||
####`showTextAera(placeholder, value)`
|
||||
#### `showTextAera(placeholder, value)`
|
||||
|
||||
- placeholder: String | undefined 文本框占位符
|
||||
- value: String | undefined 默认的文本值
|
||||
@ -227,7 +227,7 @@ quickcommand.showTextAera("请输入代码片段").then(code => {
|
||||
})
|
||||
})
|
||||
```
|
||||
####`showMessageBox(message, icon, time)`
|
||||
#### `showMessageBox(message, icon, time)`
|
||||
|
||||
- message: String 显示的消息内容
|
||||
- icon: String | undefined 图标,可为`success`、`error`、`warning`、`info`、`question`,默认为`success`
|
||||
@ -258,7 +258,7 @@ quickcommand.showConfirmBox().then(confirmed => {
|
||||
|
||||
### ❖ 延时函数
|
||||
|
||||
####`sleep(ms)`
|
||||
#### `sleep(ms)`
|
||||
|
||||
- ms: Integer 等待的毫秒
|
||||
|
||||
@ -272,7 +272,7 @@ quickcommand.sleep(200)
|
||||
utools.simulateKeyboardTap('c', 'ctrl')
|
||||
```
|
||||
|
||||
####`setTimeout(callback, ms)`
|
||||
#### `setTimeout(callback, ms)`
|
||||
|
||||
- callback: Function 回调函数
|
||||
- ms: Integer 延时的毫秒
|
||||
@ -288,7 +288,7 @@ quickcommand.setTimeout(()=>{
|
||||
```
|
||||
### ❖ 前端封装
|
||||
|
||||
####`htmlParse(html)`
|
||||
#### `htmlParse(html)`
|
||||
|
||||
- html: String 需要解析的`html`文本
|
||||
- 返回: Object `DOM`对象
|
||||
@ -389,18 +389,21 @@ quickcommand.kill(16084)
|
||||
|
||||
### ❖ utools 封装
|
||||
|
||||
#### `payload`
|
||||
#### `enterData`
|
||||
|
||||
- String 对应`utools.onPluginEnter`的 `payload`
|
||||
|
||||
当匹配模式为`关键字`时,返回进入插件的关键字;为`正则`时,返回匹配的文本;为`窗口`时,返回匹配的窗口信息;为`文件`时,返回匹配的文件信息
|
||||
- Object 对应`utools.onPluginEnter` 的 `code` `type` 和 `payload`
|
||||
- code: String 唯一标示
|
||||
- type: 匹配模式,可以为 `text` `img` `files` `regex` `over` `window`
|
||||
- payload: 当匹配模式为`关键字`时,返回进入插件的关键字;为`正则`时,返回匹配的文本;为`窗口`时,返回匹配的窗口信息;为`文件`时,返回匹配的文件信息
|
||||
|
||||
**示例**
|
||||
|
||||
```js
|
||||
// 匹配模式为正则/划词时
|
||||
var text = quickcommand.payload
|
||||
console.log(`主输入框匹配的文本为${text}`)
|
||||
if (quickcommand.enterData.type == 'regex'){
|
||||
var text = quickcommand.enterData.payload
|
||||
console.log(`主输入框匹配的文本为${text}`)
|
||||
}
|
||||
```
|
||||
|
||||
#### `simulateCopy()`
|
||||
|
Loading…
x
Reference in New Issue
Block a user