提交 cc9359ed 编写于 作者: Mosher's avatar Mosher

update:更新

上级 f43cd0f8
<#macro initControlEvents ctrl view> <#macro initControlEvents ctrl view>
<#assign hasCtrlLogic = false>
<#if ctrl.getPSControlLogics?? && ctrl.getPSControlLogics()??>
<#list ctrl.getPSControlLogics() as logic>
<#if logic.getLogicType() != 'APPVIEWLOGIC' && logic.getLogicType() != 'APPVIEWENGINE' && logic.getTriggerType() == 'CTRLEVENT'>
<#assign hasCtrlLogic = true>
</#if>
<#/list>
</#if>
<#if hasCtrlLogic>
/** /**
* 处理部件事件 * 处理部件事件
* *
...@@ -8,15 +17,13 @@ ...@@ -8,15 +17,13 @@
const data = args && args.data ? args.data : this.getData() || {}; const data = args && args.data ? args.data : this.getData() || {};
const event = args && args.event ? args.event : {}; const event = args && args.event ? args.event : {};
let result: boolean = true; let result: boolean = true;
<#if ctrl.getPSControlLogics?? && ctrl.getPSControlLogics()??>
<#list ctrl.getPSControlLogics() as logic> <#list ctrl.getPSControlLogics() as logic>
<#if logic.getLogicType() != 'APPVIEWLOGIC' && logic.getTriggerType() == 'CTRLEVENT'> <#if logic.getLogicType() != 'APPVIEWLOGIC' && logic.getLogicType() != 'APPVIEWENGINE' && logic.getTriggerType() == 'CTRLEVENT'>
if ('${logic.getEventNames()?lower_case}'.indexOf(eventName) !== -1) { if ('${logic.getEventNames()?lower_case}'.indexOf(eventName) !== -1) {
result = await this.execute_${logic.name}_ctrl_logic(data, event); result = await this.execute_${logic.name}_ctrl_logic(data, event) && result;
} }
</#if> </#if>
</#list> </#list>
</#if>
if (!result) { if (!result) {
return false; return false;
} }
...@@ -24,9 +31,8 @@ ...@@ -24,9 +31,8 @@
return true; return true;
} }
<#if ctrl.getPSControlLogics?? && ctrl.getPSControlLogics()??>
<#list ctrl.getPSControlLogics() as logic> <#list ctrl.getPSControlLogics() as logic>
<#if logic.getLogicType() != 'APPVIEWLOGIC' && logic.getTriggerType() == 'CTRLEVENT'> <#if logic.getLogicType() != 'APPVIEWLOGIC' && logic.getLogicType() != 'APPVIEWENGINE' && logic.getTriggerType() == 'CTRLEVENT'>
/** /**
* 部件逻辑 -- ${logic.name} * 部件逻辑 -- ${logic.name}
* *
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册