重构 OutputEditor:提取可重用组件并改进变量验证

This commit is contained in:
fofolee
2025-01-26 13:24:04 +08:00
parent 365964fc02
commit 40f1e1d7f7
6 changed files with 357 additions and 251 deletions

View File

@@ -10,6 +10,9 @@ export function generateCode(flow) {
return `${varName} = ${varValue};`;
}
usedVarNames[funcName].push(varName);
if (!varValue) {
return `let ${varName};`;
}
return `let ${varName} = ${varValue};`;
};