Framework7-actionsheet-templates

提供:Dev Guides
2020年6月23日 (火) 09:20時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

Framework7-アクションシートテンプレート

説明

modalActionsTemplateはパラメーターであり、アクションシートテンプレートをカスタマイズする場合は、アプリの初期化時に渡すことができます。 アプリの初期化時に_modalActionsTemplate_パラメーターを渡すことで、_Action Sheet_テンプレートをカスタマイズできます。 パラメーターは、_Template7_形式のHTML文字列を受け入れ、_groups_コンテキストが渡された_Template7_によってコンパイルされます。 テンプレートは次のようになります-

<!-- 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>