mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-20 10:55:43 +08:00
支持单独运行命令并答应输出
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
@toggle-output="toggleSaveOutput(index)"
|
||||
@update:argv="(val) => handleArgvChange(index, val)"
|
||||
@update:command="(val) => updateCommand(index, val)"
|
||||
@run="handleRunCommand"
|
||||
/>
|
||||
</div>
|
||||
</transition>
|
||||
@@ -242,6 +243,18 @@ export default defineComponent({
|
||||
};
|
||||
this.$emit("update:modelValue", newCommands);
|
||||
},
|
||||
handleRunCommand(command) {
|
||||
// 创建一个临时的命令流程
|
||||
const tempFlow = [
|
||||
command,
|
||||
{
|
||||
value: "console.log",
|
||||
argv: command.outputVariable,
|
||||
},
|
||||
];
|
||||
// 触发运行事件
|
||||
this.$emit("action", "run", tempFlow);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user