mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-07-01 05:23:54 +08:00
不适用于当前平台的命令不可以直接运行
This commit is contained in:
parent
d53c3580ce
commit
ed706aba17
@ -277,9 +277,11 @@ export default {
|
|||||||
canCommandRun() {
|
canCommandRun() {
|
||||||
// 未启用
|
// 未启用
|
||||||
if (!this.isCommandActivated) return false;
|
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;
|
return true;
|
||||||
},
|
},
|
||||||
// 命令未启用也可以添加计划任务
|
// 命令未启用也可以添加计划任务
|
||||||
|
Loading…
x
Reference in New Issue
Block a user