mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-20 10:55:43 +08:00
编排配置文件优化
This commit is contained in:
@@ -12,12 +12,12 @@ export function generateCode(commandFlow) {
|
||||
line += `let ${cmd.outputVariable} = `;
|
||||
}
|
||||
|
||||
if (cmd.value === "ubrowser") {
|
||||
line += `await ${cmd.argv}`;
|
||||
} else if (cmd.value === "axios" || cmd.value === "fetch") {
|
||||
line += `await ${cmd.argv}`;
|
||||
let awaitCmd = cmd.isAsync ? "await " : "";
|
||||
|
||||
if (!!cmd.component) {
|
||||
line += `${awaitCmd}${cmd.argv}`;
|
||||
} else {
|
||||
line += `${cmd.isAsync ? "await " : ""}${cmd.value}(${cmd.argv})`;
|
||||
line += `${awaitCmd}${cmd.value}(${cmd.argv})`;
|
||||
}
|
||||
|
||||
code.push(line);
|
||||
|
||||
Reference in New Issue
Block a user