doc: 文档更新

This commit is contained in:
lee 2020-10-15 21:52:07 +08:00
parent 11c0cb5adf
commit 60968ac334
8 changed files with 599 additions and 142 deletions

View File

@ -1,6 +1,6 @@
# 快捷命令 V2.1.0 # 快捷命令 V2.1.1
[![GitHub stars](https://img.shields.io/github/stars/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/stargazers) [![GitHub forks](https://img.shields.io/github/forks/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/network/members) [![GitHub license](https://img.shields.io/github/license/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/blob/master/LICENSE) [![version]( https://img.shields.io/badge/dynamic/json?color=f58142&label=version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Ffofolee%2FuTools-QuickerCommand%2Fmaster%2Fsrc%2Fplugin.json&style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/blob/master/src/helps/CHANGELOG.md) [![猿料](https://img.shields.io/badge/%E7%8C%BF%E6%96%99-%2Fd%2F424-red?style=flat-square)](https://yuanliao.info/d/424) [![评论](https://img.shields.io/badge/dynamic/json?color=%2350e3c2&label=%E8%AF%84%E8%AE%BA&query=%24.data.attributes.commentsCount&url=https%3A%2F%2Fyuanliao.info%2Fapi%2Fdiscussions%2F424&style=flat-square)](https://yuanliao.info/d/424) [![下载](https://img.shields.io/badge/dynamic/json?label=%E4%B8%8B%E8%BD%BD&query=quickcommand&url=http%3A%2F%2F45.77.122.164%3A8888%2FdownloadsStatistics.php&style=flat-square)](https://yuanliao.info/d/424) [![GitHub stars](https://img.shields.io/github/stars/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/stargazers) [![GitHub forks](https://img.shields.io/github/forks/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/network/members) [![GitHub license](https://img.shields.io/github/license/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/blob/master/LICENSE) [![version]( https://img.shields.io/badge/dynamic/json?color=f58142&label=version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Ffofolee%2FuTools-QuickerCommand%2Fmaster%2Fsrc%2Fplugin.json&style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/blob/master/src/helps/CHANGELOG.md) [![猿料](https://img.shields.io/badge/%E7%8C%BF%E6%96%99-%2Fd%2F424-red?style=flat-square)](https://yuanliao.info/d/424) [![评论](https://img.shields.io/badge/dynamic/json?color=%2350e3c2&label=%E8%AF%84%E8%AE%BA&query=%24.data.attributes.commentsCount&url=https%3A%2F%2Fyuanliao.info%2Fapi%2Fdiscussions%2F424&style=flat-square)](https://yuanliao.info/d/424) [![下载](https://img.shields.io/badge/dynamic/json?label=%E4%B8%8B%E8%BD%BD&query=quickcommand&url=http%3A%2F%2F45.77.122.164%3A8888%2FdownloadsStatistics.php&style=flat-square)](https://yuanliao.info/d/424)
@ -79,8 +79,10 @@
- 匹配呼出 uTools 前或唤出超级面板时的活动窗口,可以获取窗口的信息或文件夹路径作为变量 - 匹配呼出 uTools 前或唤出超级面板时的活动窗口,可以获取窗口的信息或文件夹路径作为变量
- 复制/选中文件 - 复制/选中文件
- 匹配拖入主输入框的文件或唤出超级面板时选中的文件,可以获取复制及选中的文件信息作为变量 - 匹配拖入主输入框的文件或唤出超级面板时选中的文件,可以获取复制及选中的文件信息作为变量
- 专业模式
- 匹配 JSON 格式的配置,等效于插件开发中的`features.cmds`
![UY3i7D.png](https://s1.ax1x.com/2020/07/13/UY3i7D.png) ![06C726.png](https://s1.ax1x.com/2020/10/10/06C726.png)
##### 环境 ##### 环境

View File

@ -1,6 +1,6 @@
# 快捷命令 V2.1.0 # 快捷命令 V2.1.1
[![GitHub stars](https://img.shields.io/github/stars/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/stargazers) [![GitHub forks](https://img.shields.io/github/forks/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/network/members) [![GitHub license](https://img.shields.io/github/license/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/blob/master/LICENSE) [![version]( https://img.shields.io/badge/dynamic/json?color=f58142&label=version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Ffofolee%2FuTools-QuickerCommand%2Fmaster%2Fsrc%2Fplugin.json&style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/blob/master/src/helps/CHANGELOG.md) [![猿料](https://img.shields.io/badge/%E7%8C%BF%E6%96%99-%2Fd%2F424-red?style=flat-square)](https://yuanliao.info/d/424) [![评论](https://img.shields.io/badge/dynamic/json?color=%2350e3c2&label=%E8%AF%84%E8%AE%BA&query=%24.data.attributes.commentsCount&url=https%3A%2F%2Fyuanliao.info%2Fapi%2Fdiscussions%2F424&style=flat-square)](https://yuanliao.info/d/424) [![下载](https://img.shields.io/badge/dynamic/json?label=%E4%B8%8B%E8%BD%BD&query=quickcommand&url=http%3A%2F%2F45.77.122.164%3A8888%2FdownloadsStatistics.php&style=flat-square)](https://yuanliao.info/d/424) [![GitHub stars](https://img.shields.io/github/stars/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/stargazers) [![GitHub forks](https://img.shields.io/github/forks/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/network/members) [![GitHub license](https://img.shields.io/github/license/fofolee/uTools-QuickerCommand?style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/blob/master/LICENSE) [![version]( https://img.shields.io/badge/dynamic/json?color=f58142&label=version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Ffofolee%2FuTools-QuickerCommand%2Fmaster%2Fsrc%2Fplugin.json&style=flat-square)](https://github.com/fofolee/uTools-QuickerCommand/blob/master/src/helps/CHANGELOG.md) [![猿料](https://img.shields.io/badge/%E7%8C%BF%E6%96%99-%2Fd%2F424-red?style=flat-square)](https://yuanliao.info/d/424) [![评论](https://img.shields.io/badge/dynamic/json?color=%2350e3c2&label=%E8%AF%84%E8%AE%BA&query=%24.data.attributes.commentsCount&url=https%3A%2F%2Fyuanliao.info%2Fapi%2Fdiscussions%2F424&style=flat-square)](https://yuanliao.info/d/424) [![下载](https://img.shields.io/badge/dynamic/json?label=%E4%B8%8B%E8%BD%BD&query=quickcommand&url=http%3A%2F%2F45.77.122.164%3A8888%2FdownloadsStatistics.php&style=flat-square)](https://yuanliao.info/d/424)
@ -79,8 +79,10 @@
- 匹配呼出 uTools 前或唤出超级面板时的活动窗口,可以获取窗口的信息或文件夹路径作为变量 - 匹配呼出 uTools 前或唤出超级面板时的活动窗口,可以获取窗口的信息或文件夹路径作为变量
- 复制/选中文件 - 复制/选中文件
- 匹配拖入主输入框的文件或唤出超级面板时选中的文件,可以获取复制及选中的文件信息作为变量 - 匹配拖入主输入框的文件或唤出超级面板时选中的文件,可以获取复制及选中的文件信息作为变量
- 专业模式
- 匹配 JSON 格式的配置,等效于插件开发中的`features.cmds`
![UY3i7D.png](https://s1.ax1x.com/2020/07/13/UY3i7D.png) ![06C726.png](https://s1.ax1x.com/2020/10/10/06C726.png)
##### 环境 ##### 环境

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,12 @@
## v2.1.1
- 在新建命令支持选择任意文件作为图标
- 当选择 `.PNG` `.JPG` `.ICO` 等文件时,则以图片作为图标
- 当选择 `.EXE` `.APP` 时,则以程序的图标作为图标
- 当选择其他文件时,则以该文件的默认图标作为图标
- 新增 `quickcommand.enterData` 用以获取进入插件时匹配的类型和数据,用法详见文档
- 提供一个示例,作为`专业模式``配置`的默认值
## v2.1.0 ## v2.1.0
### 新增功能 ### 新增功能
@ -6,9 +15,9 @@
- 添加`专业模式`的匹配选项 - 添加`专业模式`的匹配选项
- 可以通过 json 格式的配置实现同时匹配关键字、窗口、文件甚至图片 - 可以通过 json 格式的配置实现同时匹配关键字、窗口、文件甚至图片
- 可以实现指定文件数量、窗口类等 - 可以实现指定文件数量、窗口类等
- json 格式配置和插件开发的 features.cmds 一致 - json 格式配置和插件开发的 `features.cmds` 一致
- 配置处可以点击旁边的按钮全屏,方便填写 json 格式的配置 - 配置处可以点击旁边的按钮全屏,方便填写 json 格式的配置
- quickcommand.showTextAera 新增一个参数可以设置默认文本值 - `quickcommand.showTextAera` 新增一个参数可以设置默认文本值
![0yxZIP.png](https://s1.ax1x.com/2020/10/10/0yxZIP.png) ![0yxZIP.png](https://s1.ax1x.com/2020/10/10/0yxZIP.png)
![06SuuQ.png](https://s1.ax1x.com/2020/10/10/06SuuQ.png) ![06SuuQ.png](https://s1.ax1x.com/2020/10/10/06SuuQ.png)

File diff suppressed because one or more lines are too long

View File

@ -54,7 +54,10 @@
- 匹配拖入主输入框的文件或唤出超级面板时选中的文件,可以获取复制及选中的文件信息作为变量 - 匹配拖入主输入框的文件或唤出超级面板时选中的文件,可以获取复制及选中的文件信息作为变量
![](https://i.imgur.com/cCM2k6A.png) ##### 专业模式
- 匹配 JSON 格式的配置,等效于插件开发中的`features.cmds`
![06C726.png](https://s1.ax1x.com/2020/10/10/06C726.png)
#### 环境 #### 环境

File diff suppressed because one or more lines are too long

View File

@ -389,18 +389,21 @@ quickcommand.kill(16084)
### ❖ utools 封装 ### ❖ utools 封装
#### `payload` #### `enterData`
- String 对应`utools.onPluginEnter``payload` - Object 对应`utools.onPluginEnter``code` `type``payload`
- code: String 唯一标示
当匹配模式为`关键字`时,返回进入插件的关键字;为`正则`时,返回匹配的文本;为`窗口`时,返回匹配的窗口信息;为`文件`时,返回匹配的文件信息 - type: 匹配模式,可以为 `text` `img` `files` `regex` `over` `window`
- payload: 当匹配模式为`关键字`时,返回进入插件的关键字;为`正则`时,返回匹配的文本;为`窗口`时,返回匹配的窗口信息;为`文件`时,返回匹配的文件信息
**示例** **示例**
```js ```js
// 匹配模式为正则/划词时 // 匹配模式为正则/划词时
var text = quickcommand.payload if (quickcommand.enterData.type == 'regex'){
var text = quickcommand.enterData.payload
console.log(`主输入框匹配的文本为${text}`) console.log(`主输入框匹配的文本为${text}`)
}
``` ```
#### `simulateCopy()` #### `simulateCopy()`