mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-08-13 08:59:35 +08:00
修复生成代码时,对是否具有输出变量判断错误的BUG
This commit is contained in:
parent
ce098f5d75
commit
3f9b4fc642
@ -49,8 +49,9 @@ export function generateCode(flow) {
|
|||||||
|
|
||||||
let cmdCode = cmd.code;
|
let cmdCode = cmd.code;
|
||||||
// 处理输出变量
|
// 处理输出变量
|
||||||
if (cmd.outputVariable) {
|
const outputVariable = cmd.outputVariable || {};
|
||||||
const { name, details } = cmd.outputVariable;
|
const { name, details } = outputVariable;
|
||||||
|
if (name || !window.lodashM.isEmpty(details)) {
|
||||||
if (cmd.asyncMode === "then") {
|
if (cmd.asyncMode === "then") {
|
||||||
// 使用回调函数模式
|
// 使用回调函数模式
|
||||||
if (cmd.callbackFunc) {
|
if (cmd.callbackFunc) {
|
||||||
@ -136,7 +137,5 @@ export function generateCode(flow) {
|
|||||||
|
|
||||||
export function generateFlowsCode(flows) {
|
export function generateFlowsCode(flows) {
|
||||||
const [mainFlow, ...subFlows] = flows;
|
const [mainFlow, ...subFlows] = flows;
|
||||||
return [...subFlows, mainFlow]
|
return [...subFlows, mainFlow].map((flow) => generateCode(flow)).join("\n\n");
|
||||||
.map((flow) => generateCode(flow))
|
|
||||||
.join("\n\n");
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user