From ade723a83dd9bdced928c105224540bba53a3cab Mon Sep 17 00:00:00 2001 From: Zhicheng WANG Date: Sat, 30 Jan 2021 20:03:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20API=20=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=EF=BC=8C=E4=BB=A5=E5=85=8D=E6=A8=A1=E6=9D=BF=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=86=85=E5=AE=B9=E5=92=8C=E6=96=87=E6=A1=A3=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=86=85=E5=AE=B9=E8=A2=AB=E9=94=99=E8=AF=AF=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E4=B8=BA=E4=B8=80=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transforms/templates/api/export-base.template.html | 2 +- .../transforms/templates/api/includes/security-notes.html | 2 +- aio/tools/transforms/templates/api/lib/memberHelpers.html | 6 +++--- aio/tools/transforms/templates/api/lib/paramList.html | 2 +- aio/tools/transforms/templates/api/ngmodule.template.html | 2 +- aio/tools/transforms/templates/api/package.template.html | 2 +- aio/tools/transforms/templates/cli/lib/cli.html | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/aio/tools/transforms/templates/api/export-base.template.html b/aio/tools/transforms/templates/api/export-base.template.html index 664d0ebfaa..51d8e3eebf 100644 --- a/aio/tools/transforms/templates/api/export-base.template.html +++ b/aio/tools/transforms/templates/api/export-base.template.html @@ -3,7 +3,7 @@ {% block body %}
{$ doc.shortDescription | marked $} - {% if doc.description %}

查看"说明"...

{% endif %} + {% if doc.description %}

查看"说明"...

{% endif %}
{% include "includes/security-notes.html" %} {% include "includes/deprecation.html" %} diff --git a/aio/tools/transforms/templates/api/includes/security-notes.html b/aio/tools/transforms/templates/api/includes/security-notes.html index 6a8ba71c5c..baae166cd4 100644 --- a/aio/tools/transforms/templates/api/includes/security-notes.html +++ b/aio/tools/transforms/templates/api/includes/security-notes.html @@ -1,6 +1,6 @@ {% if doc.security %}
-

安全风险

+

安全风险

{$ doc.security | marked $}
{% endif %} diff --git a/aio/tools/transforms/templates/api/lib/memberHelpers.html b/aio/tools/transforms/templates/api/lib/memberHelpers.html index 91dd64356b..7e3a0a6bb0 100644 --- a/aio/tools/transforms/templates/api/lib/memberHelpers.html +++ b/aio/tools/transforms/templates/api/lib/memberHelpers.html @@ -211,9 +211,9 @@ {%- if (property.isGetAccessor or property.isReadonly) and not property.isSetAccessor %}只读{% endif %} - {%- if property.isSetAccessor and not property.isGetAccessor %}Write-only.{% endif %} - {% if property.constructorParamDoc %} Declared in constructor.{% endif %} - {% if property.shortDescription %}{$ property.shortDescription | marked $}{% endif %} + {%- if property.isSetAccessor and not property.isGetAccessor %}只写{% endif %} + {% if property.constructorParamDoc %} 声明在构造函数中{% endif %} + {% if property.shortDescription %}
{$ property.shortDescription | marked $}
{% endif %} {$ (property.description or property.constructorParamDoc.description) | marked $} {%- if property.see.length %}

参见:

diff --git a/aio/tools/transforms/templates/api/lib/paramList.html b/aio/tools/transforms/templates/api/lib/paramList.html index 24bf09d4be..8973e7727d 100644 --- a/aio/tools/transforms/templates/api/lib/paramList.html +++ b/aio/tools/transforms/templates/api/lib/paramList.html @@ -27,7 +27,7 @@ {% if (parameter.shortDescription | trim) or (parameter.description | trim) %}{$ parameter.shortDescription + '\n\n' + parameter.description $} {% endif %} - {% if parameter.isOptional or parameter.defaultValue !== undefined %}可选. 默认值是 `{$ parameter.defaultValue === undefined and 'undefined' or parameter.defaultValue $}`.{% endif %} + {% if parameter.isOptional or parameter.defaultValue !== undefined %}
可选. 默认值是 `{$ parameter.defaultValue === undefined and 'undefined' or parameter.defaultValue $}`.
{% endif %} {% endmarked %} {% endfor %} diff --git a/aio/tools/transforms/templates/api/ngmodule.template.html b/aio/tools/transforms/templates/api/ngmodule.template.html index c6f9691831..1bf726aad2 100644 --- a/aio/tools/transforms/templates/api/ngmodule.template.html +++ b/aio/tools/transforms/templates/api/ngmodule.template.html @@ -43,7 +43,7 @@ - {% if item.deprecated !== undefined %}{$ ('**已弃用:** ' + item.deprecated) | marked $}{% endif %} + {% if item.deprecated !== undefined %}
{$ ('**已弃用:** ' + item.deprecated) | marked $}
{% endif %} {$ item.shortDescription | marked $} diff --git a/aio/tools/transforms/templates/api/package.template.html b/aio/tools/transforms/templates/api/package.template.html index b3fa99054f..7c432b6ad9 100644 --- a/aio/tools/transforms/templates/api/package.template.html +++ b/aio/tools/transforms/templates/api/package.template.html @@ -10,7 +10,7 @@ {$ item.name $} - {% if item.deprecated !== undefined %}{$ ('**已废弃:** ' + item.deprecated) | marked $}{% endif %} + {% if item.deprecated !== undefined %}
{$ ('**已废弃:** ' + item.deprecated) | marked $}
{% endif %} {% if item.shortDescription %}{$ item.shortDescription | marked $}{% endif %} diff --git a/aio/tools/transforms/templates/cli/lib/cli.html b/aio/tools/transforms/templates/cli/lib/cli.html index e6fba39c1c..7a706834e6 100644 --- a/aio/tools/transforms/templates/cli/lib/cli.html +++ b/aio/tools/transforms/templates/cli/lib/cli.html @@ -64,8 +64,8 @@ {% endif %} {% endif %} {$ option.description | marked $} - {% if option.default !== undefined %}

默认值: {$ option.default $}

{% endif %} - {% if option.aliases.length %}

别名: {% for alias in option.aliases %}{$ renderOptionName(alias) $}{% if not loop.last %}, {% endif %}{% endfor %}

{% endif %} + {% if option.default !== undefined %}

默认值: {$ option.default $}

{% endif %} + {% if option.aliases.length %}

别名: {% for alias in option.aliases %}{$ renderOptionName(alias) $}{% if not loop.last %}, {% endif %}{% endfor %}

{% endif %} {% endfor %}