<#-- 视图内容绘制 --> <#if view.getPSViewMsgGroup()??> <#assign viewMsgGroup = view.getPSViewMsgGroup()/> /** * 绘制视图消息 (上方) * * @returns * @memberof ${srfclassname('${view.name}')} */ public renderPosTopMsgs() { return ( <div class='view-top-messages'> <#list viewMsgGroup.getPSViewMsgGroupDetails() as detail> <#assign msg = detail.getPSViewMsg()> <#-- 暂时支持静态 --> <#if msg.getCodeName() != '' && msg.getPosition() == 'TOP' && msg.getDynamicMode() == 0> {this.render${msg.getCodeName()}()} </#if> </#list> </div> ); } /** * 绘制视图消息 (下方) * * @returns * @memberof ${srfclassname('${view.name}')} */ public renderPosBottomMsgs() { return ( <div class='view-bottom-messages'> <#list viewMsgGroup.getPSViewMsgGroupDetails() as detail> <#assign msg = detail.getPSViewMsg()> <#-- 暂时支持静态 --> <#if msg.getCodeName() != '' && msg.getPosition() == 'BOTTOM' && msg.getDynamicMode() == 0> {this.render${msg.getCodeName()}()} </#if> </#list> </div> ); } <#list viewMsgGroup.getPSViewMsgGroupDetails() as detail> <#assign msg = detail.getPSViewMsg()> <#-- 暂时支持静态 --> <#if msg.getCodeName() != '' && msg.getDynamicMode() == 0> <#assign type = msg.getMessageType() /> /** * ${msg.getName()} * * @returns * @memberof ${srfclassname('${view.name}')} */ public render${msg.getCodeName()}() { return ( <alert type='<#if type == 'INFO'>info<#elseif type == 'WARN'>warning<#elseif type == 'ERROR'>error<#else>info</#if>' closable={${msg.isEnableRemove()?c}}> ${msg.getTitle()} <span slot='desc'>${msg.getMessage()}</span> </alert> ); } </#if> </#list> <#else> /** * 绘制视图消息 (上方) * * @returns * @memberof ${srfclassname('${view.name}')} */ public renderPosTopMsgs() { return ( <div class='view-top-messages'> </div> ); } /** * 绘制视图消息 (下方) * * @returns * @memberof ${srfclassname('${view.name}')} */ public renderPosBottomMsgs() { return ( <div class='view-bottom-messages'> </div> ); } </#if> /** * 绘制内容 * * @param {CreateElement} h * @returns * @memberof ${srfclassname('${view.name}')} */ public render(h: CreateElement) { return ( <@ibizindent blank=8> ${P.getLayoutCode().code} </@ibizindent> ); }