|
|
@ -505,13 +505,13 @@ export class TemplateParamDetail extends React.Component<{}> {
|
|
|
|
let result = CheckExpr(par.expr as string, paramDefine);
|
|
|
|
let result = CheckExpr(par.expr as string, paramDefine);
|
|
|
|
if (result.error !== undefined)//执行出错 反馈error
|
|
|
|
if (result.error !== undefined)//执行出错 反馈error
|
|
|
|
{
|
|
|
|
{
|
|
|
|
app.Editor.Prompt("表达式求值失败:" + result.error, LogType.Error);
|
|
|
|
app.Editor.Prompt(`模块变量:${par.name},表达式:${par.expr}的表达式求值失败!` + result.error, LogType.Error);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if (typeof (result.res) !== "number")//不是数字 表达式无效
|
|
|
|
if (typeof (result.res) !== "number")//不是数字 表达式无效
|
|
|
|
{
|
|
|
|
{
|
|
|
|
app.Editor.Prompt("无效表达式", LogType.Error);
|
|
|
|
app.Editor.Prompt(`模块变量:${par.name},表达式:${par.expr},无效表达式!` + result.error, LogType.Error);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|