diff --git a/src/components/CommandCard.vue b/src/components/CommandCard.vue index a4c9bdc..183c837 100644 --- a/src/components/CommandCard.vue +++ b/src/components/CommandCard.vue @@ -2,11 +2,12 @@
-
+
-
+
-
+
{{ commandInfo.features.explain }}
-
-
+
+
{{ commandInfo.program }} -
+
1, + showPlatforms: this.cardStyle.code > 2, + showLanguages: this.cardStyle.code > 1, + showBiggerTitle: this.cardStyle.code > 2, + logoPosition: + this.cardStyle.code > 1 ? "justify-start" : "justify-center", + fontPosition: + this.cardStyle.code > 1 ? "justify-end" : "justify-center", + hideCard: + this.cardStyle.code === 1 && + (!this.isCommandActivated || !this.canCommandRun), + }; + }, + // 命令是否可直接运行, 无论 cmds 长度为多少,只运行 cmds[0] canCommandRun() { - return ( - this.commandInfo.features.cmds.filter((x) => x.length).length && - this.isCommandActivated - ); + // 未启用 + if (!this.isCommandActivated) return false; + let cmd = this.commandInfo.features.cmds[0]; + // 窗口模式 + if (cmd.type && cmd.type === "window") return false; + return true; }, // 匹配类型的颜色 cmdBadgeColor() { @@ -302,7 +321,7 @@ export default { } .matchTypesBox { height: 23px; - width: 80%; + width: 100%; overflow: hidden; text-align: right; }