options.ejs 820 B

12345678910111213141516171819
  1. <div>
  2. <h3 id="<%- gennerateID(module + ':' + name + ':options') %>">参数说明</h3>
  3. <ul class="params-list">
  4. <% _.sortBy( options, function( value ){ return value.uses ? value.uses.length : 0; } ).forEach(function( item ) { %>
  5. <li>
  6. <span class="meta">
  7. <code><%= item.shortname || item.name %></code>
  8. <% if ( item.type ) { %> {<%=: item.type | join:', ' %>} <% }%>
  9. <% if ( item.optional ) { %> [可选] <% }%>
  10. <% if ( item.defaultvalue ) { %> [默认值:<%= item.defaultvalue %>] <% }%>
  11. </span>
  12. <%- markdown(item.description) %>
  13. <% if ( item.uses ) { %>
  14. <%- renderUses( item.uses, '依赖: %s。' ) %>
  15. <% } %>
  16. </li>
  17. <% }) %>
  18. </ul>
  19. </div>