Skip to content

Commit

Permalink
docs(module:input): update input doc
Browse files Browse the repository at this point in the history
  • Loading branch information
vthinkxie authored and vthinkxie committed Jun 22, 2019
1 parent 4660690 commit f56027e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
8 changes: 4 additions & 4 deletions components/input/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ All props of input supported by [w3c standards](https://www.w3schools.com/tags/t

| Property | Description | Type | Default |
| -------- | ----------- | ---- | ------- |
| `[nzAddOnAfter]` | The label text displayed after (on the right side of) the input field. | `string|TemplateRef<void>` | - |
| `[nzAddOnBefore]` | The label text displayed before (on the left side of) the input field. | `string|TemplateRef<void>` | - |
| `[nzPrefix]` | The prefix icon for the Input. | `string|TemplateRef<void>` | - |
| `[nzSuffix]` | The suffix icon for the Input. | `string|TemplateRef<void>` | - |
| `[nzAddOnAfter]` | The label text displayed after (on the right side of) the input field, can work with `nzAddOnBefore` | `string|TemplateRef<void>` | - |
| `[nzAddOnBefore]` | The label text displayed before (on the left side of) the input field, can work with `nzAddOnAfter` | `string|TemplateRef<void>` | - |
| `[nzPrefix]` | The prefix icon for the Input, can work with `nzSuffix` | `string|TemplateRef<void>` | - |
| `[nzSuffix]` | The suffix icon for the Input, can work with `nzPrefix` | `string|TemplateRef<void>` | - |
| `[nzCompact]` | Whether use compact style | `boolean` | `false` |
| `[nzSize]` | The size of `nz-input-group` specifies the size of the included `nz-input` fields | `'large'|'small'|'default'` | `'default'` |
8 changes: 4 additions & 4 deletions components/input/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ nz-input 可以使用所有的W3C标准下的所有 [使用方式](https://www.w

| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| `[nzAddOnAfter]` | 带标签的 input,设置后置标签 | `string|TemplateRef<void>` | - |
| `[nzAddOnBefore]` | 带标签的 input,设置前置标签 | `string|TemplateRef<void>` | - |
| `[nzPrefix]` | 带有前缀图标的 input | `string|TemplateRef<void>` | - |
| `[nzSuffix]` | 带有后缀图标的 input | `string|TemplateRef<void>` | - |
| `[nzAddOnAfter]` | 带标签的 input,设置后置标签,可以与 `nzAddOnBefore` 配合使用 | `string|TemplateRef<void>` | - |
| `[nzAddOnBefore]` | 带标签的 input,设置前置标签,可以与 `nzAddOnBefore` 配合使用 | `string|TemplateRef<void>` | - |
| `[nzPrefix]` | 带有前缀图标的 input,可以与 `nzSuffix` 配合使用 | `string|TemplateRef<void>` | - |
| `[nzSuffix]` | 带有后缀图标的 input,可以与 `nzPrefix` 配合使用 | `string|TemplateRef<void>` | - |
| `[nzCompact]` | 是否用紧凑模式 | `boolean` | `false` |
| `[nzSearch]` | 是否用搜索框 | `boolean` | `false` |
| `[nzSize]` | `nz-input-group` 中所有的 `nz-input` 的大小 | `'large'|'small'|'default'` | `'default'` |
12 changes: 7 additions & 5 deletions components/input/nz-input-group.component.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<span class="ant-input-wrapper ant-input-group" *ngIf="isAddOn">
<span class="ant-input-group-addon" *ngIf="nzAddOnBefore || nzAddOnBeforeIcon">
<i nz-icon [type]="nzAddOnBeforeIcon" *ngIf="nzAddOnBeforeIcon"></i>
<i nz-icon [nzType]="nzAddOnBeforeIcon" *ngIf="nzAddOnBeforeIcon"></i>
<ng-container *nzStringTemplateOutlet="nzAddOnBefore">{{ nzAddOnBefore }}</ng-container>
</span>
<ng-template [ngIf]="!isAffix" *ngTemplateOutlet="contentTemplate"></ng-template>
<ng-container *ngIf="!isAffix">
<ng-template *ngTemplateOutlet="contentTemplate"></ng-template>
</ng-container>
<span class="ant-input-affix-wrapper" [class.ant-input-affix-wrapper-sm]="isSmall" [class.ant-input-affix-wrapper-lg]="isLarge" *ngIf="isAffix">
<ng-template *ngTemplateOutlet="affixTemplate"></ng-template>
</span>
<span class="ant-input-group-addon" *ngIf="nzAddOnAfter || nzAddOnAfterIcon">
<i nz-icon [type]="nzAddOnAfterIcon" *ngIf="nzAddOnAfterIcon"></i>
<i nz-icon [nzType]="nzAddOnAfterIcon" *ngIf="nzAddOnAfterIcon"></i>
<ng-container *nzStringTemplateOutlet="nzAddOnAfter">{{ nzAddOnAfter }}</ng-container>
</span>
</span>
Expand All @@ -18,12 +20,12 @@
<ng-template #affixTemplate>
<span class="ant-input-prefix" *ngIf="nzPrefix || nzPrefixIcon">
<!-- TODO: should have a class to set its color, cc: antd-->
<i nz-icon [type]="nzPrefixIcon" *ngIf="nzPrefixIcon" style="color: rgba(0, 0, 0, 0.25)"></i>
<i nz-icon [nzType]="nzPrefixIcon" *ngIf="nzPrefixIcon" style="color: rgba(0, 0, 0, 0.25)"></i>
<ng-container *nzStringTemplateOutlet="nzPrefix">{{ nzPrefix }}</ng-container>
</span>
<ng-template *ngTemplateOutlet="contentTemplate"></ng-template>
<span class="ant-input-suffix" *ngIf="nzSuffix || nzSuffixIcon">
<i nz-icon [type]="nzSuffixIcon" *ngIf="nzSuffixIcon"></i>
<i nz-icon [nzType]="nzSuffixIcon" *ngIf="nzSuffixIcon"></i>
<ng-container *nzStringTemplateOutlet="nzSuffix">{{ nzSuffix }}</ng-container>
</span>
</ng-template>
Expand Down
2 changes: 2 additions & 0 deletions docs/introduce.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ $ npm install ng-zorro-antd
- [Aliyun](http://www.aliyun.com/)
- [Apache Flink](https://flink.apache.org/)
- [ThoughtWorks](https://www.thoughtworks.com/)
- [GongDao](https://www.gongdao.com/)
- [QingFlow](https://qingflow.com/)

> If your company or product uses ng-zorro-antd, let us know [here](https://github.com/NG-ZORRO/ng-zorro-antd/issues/1142)!
Expand Down
2 changes: 2 additions & 0 deletions docs/introduce.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ $ ng add ng-zorro-antd
- [阿里云](http://www.aliyun.com/)
- [Apache Flink](https://flink.apache.org/)
- [ThoughtWorks](https://www.thoughtworks.com/)
- [共道科技](https://www.gongdao.com/)
- [轻流](https://qingflow.com/)

> 如果你的公司和产品使用了 NG-ZORRO,欢迎到 [这里](https://github.com/NG-ZORRO/ng-zorro-antd/issues/1142) 留言。
Expand Down

0 comments on commit f56027e

Please sign in to comment.