Framework7 - 操作表到弹出窗口模板

描述

每当您使用 操作表 对话到弹出窗口时,您都可以通过在应用初始化时传递 modalActionsToPopoverTemplate 参数来自定义弹出窗口模板。该参数将接受 Template7 格式的 HTML 字符串,该字符串将由 Template7 使用传递的 groups 上下文进行编译。

默认模板将如下所示 −

<div class = "popover actions-popover">
   <div class = "popover-inner">
      {{#each this}}
         <div class = "list-block">
            <ul>
               {{#each this}}
                  {{#if label}}
                     <li class = "actions-popover-label 
                     {{#if color}}color-{{color}}{{/if}} 
                     {{#if bold}}actions-popover-bold{{/if}}">{{text}}</li>
                  {{else}}
                     <li><a href = "#" class = "item-link list-button 
                     {{#if color}}color-{{color}}{{/if}} {{#if bg}}bg-{{bg}}{{/if}} 
                     {{#if bold}}actions-popover-bold{{/if}} 
                     {{#if disabled}}disabled{{/if}}">{{ some text}}</a></li> 
                  {{/if}}
               {{/each}}
            </ul>
         </div>
      {{/each}}
   </div>
</div>

framework7_overlays.html