弹出模板的操作表(Action Sheet To Popover Template)

优质
小牛编辑
125浏览
2023-12-01

描述 (Description)

每当您使用Action Sheet对话进行弹出时,您都可以通过在App初始化时传递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>