2018-10-22 18:47:41 +08:00

60 lines
2.3 KiB
HTML

{% extends 'base.template.html' -%}
{% macro listItems(items, title, overridePath) %}
{% set filteredItems = items | filterByPropertyValue('internal', undefined) %}
{% if filteredItems.length %}
<section class="export-list">
<h3>{$ title $}</h3>
<table class="is-full-width list-table">
{% for item in filteredItems %}
<tr>
<td><code class="code-anchor"><a href="{$ overridePath or item.path $}"{%- if item.deprecated != undefined %} class="deprecated-api-item"{% endif %}>{$ item.name $}</a></code></td>
<td>
{% if item.deprecated !== undefined %}{$ ('**已废弃:** ' + item.deprecated) | marked $}{% endif %}
{% if item.shortDescription %}{$ item.shortDescription | marked $}{% endif %}
</td>
</tr>
{% endfor %}
</table>
</section>
{% endif %}
{% endmacro %}
{% block header %}
<header class="api-header">
<h1>{$ doc.name $}</h1>
<label class="api-type-label {$ doc.docType $}">{$ doc.docType $}</label>
{% if doc.packageDeprecated or (not doc.isPrimaryPackage and doc.deprecated !== undefined) %}<label class="api-status-label deprecated">弃用</label>{% endif %}
{% if doc.security !== undefined %}<label class="api-status-label security">安全性</label>{% endif %}
{% if doc.pipeOptions.pure === 'false' %}<label class="api-status-label impure-pipe">非纯</label>{% endif %}
</header>
{% endblock %}
{% block body -%}
{$ doc.shortDescription | marked $}
{% if doc.description %}{$ doc.description | marked $}{% endif %}
{% include "includes/see-also.html" %}
{% if doc.isPrimaryPackage %}
<h2 id="entry-points">入口点</h2>
{$ listItems([doc.packageInfo.primary], '主要', '#primary-entry-point-exports') $}
{$ listItems(doc.packageInfo.secondary, '次要') $}
{% endif %}
{% if doc.isPrimaryPackage %}
<h2 id="primary-entry-point-exports">主入口点的导出</h2>
{% else %}
<h2 id="entry-point-exports">入口点的导出</h2>
{% endif %}
{% include "includes/deprecation.html" %}
{$ listItems(doc.ngmodules, '模块') $}
{$ listItems(doc.classes, '类') $}
{$ listItems(doc.decorators, '装饰器') $}
{$ listItems(doc.functions, '函数') $}
{$ listItems(doc.structures, '结构') $}
{$ listItems(doc.directives, '指令') $}
{$ listItems(doc.pipes, '管道') $}
{$ listItems(doc.types, '类型') $}
{%- endblock %}