mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-17 08:54:19 +08:00
重构代码结构、数据传递方式,方便数据存取
This commit is contained in:
@@ -6,6 +6,7 @@ export function generateCode(commandFlow) {
|
||||
const indent = hasAsyncFunction ? " " : "";
|
||||
|
||||
commandFlow.forEach((cmd) => {
|
||||
if (!cmd.code) return;
|
||||
let line = indent;
|
||||
|
||||
if (cmd.outputVariable) {
|
||||
@@ -13,8 +14,7 @@ export function generateCode(commandFlow) {
|
||||
}
|
||||
|
||||
let awaitCmd = cmd.isAsync ? "await " : "";
|
||||
line += `${awaitCmd} ${cmd.argv}`;
|
||||
|
||||
line += `${awaitCmd} ${cmd.code}`;
|
||||
code.push(line);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user