diff --git a/aio/content/translations/cn/api-plan.md b/aio/content/translations/cn/api-plan.md index 93a1f8fb37..1e5ff71cb2 100644 --- a/aio/content/translations/cn/api-plan.md +++ b/aio/content/translations/cn/api-plan.md @@ -32,7 +32,7 @@ [x] | core/ElementRef | 0.67 [x] | core/OnInit | 0.66 [x] | common/UpperCasePipe | 0.65 -[ ] | common/NgStyle | 0.60 +[x] | common/NgStyle | 0.60 [ ] | router/RouterOutlet | 0.59 [ ] | forms/Validators | 0.59 [ ] | common/http/HttpHeaders | 0.56 diff --git a/packages/common/src/directives/ng_style.ts b/packages/common/src/directives/ng_style.ts index 9062f05b0f..f4a25a1b7d 100644 --- a/packages/common/src/directives/ng_style.ts +++ b/packages/common/src/directives/ng_style.ts @@ -24,10 +24,19 @@ import {Directive, DoCheck, ElementRef, Input, KeyValueChanges, KeyValueDiffer, * * Update an HTML element styles. * + * 修改 HTML 元素的样式。 + * * The styles are updated according to the value of the expression evaluation: + * + * 这些样式会根据表达式的求值结果进行更新: + * * - keys are style names with an optional `.` suffix (ie 'top.px', 'font-style.em'), + * + * key 是样式名,可以带一个可选的 `.` 后缀(比如 'top.px', 'font-style.em'), + * * - values are the values assigned to those properties (expressed in the given unit). * + * value 是一些与这些属性相关的值(以指定的单位表示)。 * */ @Directive({selector: '[ngStyle]'})