Framework7 - 操作表模板



描述

modalActionsTemplate 是一个参数,如果要自定义操作表模板,可以在应用程序初始化时传递。您可以通过在应用程序初始化时传递 modalActionsTemplate 参数来自定义操作表模板。该参数将接受Template7 格式的 HTML 字符串,该字符串将由Template7 使用传递的groups 上下文进行编译。模板将如下所示:

<!-- This template will equalt to default layout -->
<div class = "actions-modal">
   <!-- this is a single group -->
   {{#each this}}
      <div class = "actions-modal-group">
         <!-- this represents a single button -->
         
         {{#each this}}
            {{#if label}}
               <span class = "actions-modal-label">{{text}}</span>
            {{else}}
               <div class = "actions-modal-button {{#if color}}color-{{color}}{{/if}} 
                  {{#if bold}}actions-modal-button-bold{{/if}}">{{text}}
               </div>
            {{/if}}
         {{/each}}
         
      </div>
   {{/each}}
</div>
framework7_overlays.htm
广告

© . All rights reserved.