修复:当增加模块参数时,清空模块的参数值缓存

pull/2827/MERGE
ChenX 3 months ago
parent 021320fdb9
commit fda9edfeae

@ -657,6 +657,16 @@ export class TemplateRecord extends SymbolTableRecord
return vars;
}
//清空变量缓存(当增加参数时,如果不清空缓存,下层的变量会无法取得当前层的变量值)
ClearParameterDefinitionCache()
{
this.Traverse(t =>
{
t._CacheParamVars = undefined;
t._CatchRootParam = undefined;
});
}
/**
*
* - ,`_`

@ -626,6 +626,8 @@ export class TempalteActionDialog extends React.Component<ITempalteActionDialogP
param.isLock = this.pararmConfig.isLock;
param.type = this.pararmConfig.type;
template.Params.push(param);
template.ClearParameterDefinitionCache();
this.props.store.params.push(this.pararmConfig);
this.props.store.usedParamNames.add(param.name);
};

Loading…
Cancel
Save