完善执行命令功能 90%

This commit is contained in:
fofolee
2022-04-10 00:38:56 +08:00
parent e86fb1b02a
commit 73c5dbacee
9 changed files with 200 additions and 140 deletions

View File

@@ -108,10 +108,9 @@
<span v-for="cmd in commandInfo.features.cmds" :key="cmd">
<span v-if="typeof cmd === 'string'">
<q-badge rounded :color="cmdBadgeColor()"
><q-icon
class="q-mr-xs"
:name="commandTypes.key.icon"
/>{{ getShortStrByByte(cmd) }}</q-badge
><q-icon class="q-mr-xs" :name="commandTypes.key.icon" />{{
getShortStrByByte(cmd)
}}</q-badge
>
<q-tooltip>
<div class="text-subtitle2">
@@ -302,9 +301,11 @@ export default {
},
// 运行命令
runCommand() {
utools.redirect(
this.commandInfo.features.cmds.filter((x) => x.length)[0]
);
let event = {
type: "run",
data: this.commandInfo.features.code,
};
this.$emit("commandChanged", event);
},
// 启用/禁用命令
toggleCommandActivated() {