diff --git a/dev_tools/template_extend.js b/dev_tools/template_extend.js index 4abf138..5c2be01 100644 --- a/dev_tools/template_extend.js +++ b/dev_tools/template_extend.js @@ -28,7 +28,12 @@ if (fs.existsSync(filePath)) { } }); console.log('total rows: ' + confArr.length); - formProps = eval('(' + confArr.join('\n') + ')'); + const funStr = ` + const uploadApi = ''; // 修复文件上传引用的API + return ${confArr.join('\n')} + `; + const fun = new Function(funStr); + formProps = fun(); } else { process.exit(0); }