From ed706aba170616e63d363b3683a34c552791ea73 Mon Sep 17 00:00:00 2001 From: fofolee Date: Thu, 21 Apr 2022 11:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E9=80=82=E7=94=A8=E4=BA=8E=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E5=B9=B3=E5=8F=B0=E7=9A=84=E5=91=BD=E4=BB=A4=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E7=9B=B4=E6=8E=A5=E8=BF=90=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CommandCard.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/CommandCard.vue b/src/components/CommandCard.vue index 3d36066..1bb5af4 100644 --- a/src/components/CommandCard.vue +++ b/src/components/CommandCard.vue @@ -277,9 +277,11 @@ export default { canCommandRun() { // 未启用 if (!this.isCommandActivated) return false; - let cmd = this.commandInfo.features.cmds[0]; + let { platform, cmds } = this.commandInfo.features; + if (!_.isEmpty(platform) && !platform.includes(window.processPlatform)) + return false; // 窗口模式 - if (cmd.type && cmd.type === "window") return false; + if (cmds[0].type && cmds[0].type === "window") return false; return true; }, // 命令未启用也可以添加计划任务