不适用于当前平台的命令不可以直接运行

This commit is contained in:
fofolee 2022-04-21 11:02:22 +08:00
parent d53c3580ce
commit ed706aba17

View File

@ -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;
}, },
// //