From cf2dcd1c218c647a60b2dc7b497871bec3b8f6b6 Mon Sep 17 00:00:00 2001 From: fofolee Date: Tue, 5 Apr 2022 22:26:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8C=B9=E9=85=8D=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CommandCard.vue | 35 +++++--- src/components/CommandEditor.vue | 142 +++++++++++++++++++++++-------- src/js/commandTypes.js | 61 +++++++++++++ 3 files changed, 189 insertions(+), 49 deletions(-) create mode 100644 src/js/commandTypes.js diff --git a/src/components/CommandCard.vue b/src/components/CommandCard.vue index a1056ae..02492a5 100644 --- a/src/components/CommandCard.vue +++ b/src/components/CommandCard.vue @@ -79,7 +79,7 @@ v-ripple :style="{ color: isCommandActivated ? 'unset' : 'grey', - background: $q.dark.isActive ? '#ffffff08' : '#00000008' + background: $q.dark.isActive ? '#ffffff08' : '#00000008', }" > @@ -108,9 +108,10 @@ {{ - getShortStrByByte(cmd) - }}{{ getShortStrByByte(cmd) }}
@@ -120,9 +121,10 @@ {{ - getShortStrByByte(cmd.match.app[0]) - }} + >{{ getShortStrByByte(cmd.match.app[0]) }}
+ > {{ (cmd.match && getShortStrByByte(cmd.match)) || "所有文件" }} {{ - getShortStrByByte(cmd.match) - }} + >{{ getShortStrByByte(cmd.match) }}
@@ -161,12 +164,15 @@ 所有文本 + >所有文本 - 图片 + 图片 @@ -201,12 +207,15 @@ diff --git a/src/js/commandTypes.js b/src/js/commandTypes.js new file mode 100644 index 0000000..9eaeed3 --- /dev/null +++ b/src/js/commandTypes.js @@ -0,0 +1,61 @@ +const commandTypes = { + keyword: { + name: "keyword", + label: "关键词", + icon: "font_download", + matchLabel: "关键词", + desc: "在主输入框输入对应关键字进入插件,最通用的一种模式,关键字可以设置多个", + valueType: "array" + }, + regex: { + name: "regex", + label: "正则/划词", + matchLabel: "正则", + icon: "rule", + desc: "匹配主输入框或超级面板选中的文本,可以获取输入框文本或选中文本作为变量", + valueType: "regex" + }, + over: { + name: "over", + label: "所有文本", + matchLabel: "无需设置", + icon: "emergency", + desc: "匹配主输入框的所有文本,但只有在该文本未设置对应的插件或功能时才生效", + valueType: "null" + }, + window: { + name: "window", + label: "窗口/进程", + matchLabel: "进程名", + icon: "widgets", + desc: "匹配呼出uTools前或唤出超级面板时的活动窗口,可以获取窗口的信息或文件夹路径作为变量", + valueType: "array" + }, + img: { + name: "img", + label: "图片", + matchLabel: "无需配置", + icon: "panorama", + desc: "匹配主输入框或超级面板选中的图片,并返回图片的 base64", + valueType: "null" + }, + files: { + name: "files", + label: "复制/选中文件", + matchLabel: "正则", + icon: "description", + desc: "匹配主输入框或超级面板选中的文件,可以获取复制及选中的文件信息作为变量", + valueType: "regex" + + }, + professional: { + name: "professional", + label: "专业模式", + matchLabel: "json配置", + icon: "construction", + desc: "通过json格式的配置实现同时匹配关键字、窗口、文件甚至图片,或者指定文件数量、窗口类等", + valueType: "json" + } +} + +export default commandTypes \ No newline at end of file