Skip to content

Commit

Permalink
docs(module:tooltip etc): trigger could be null (NG-ZORRO#4298)
Browse files Browse the repository at this point in the history
* docs(module:tooltip etc): trigger could be null

* docs: cleanup
  • Loading branch information
Wendell authored and vthinkxie committed Oct 16, 2019
1 parent 7053a1d commit e0a1a21
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion components/popconfirm/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
| Param | Description | Type | Default value |
| ----- | ----------- | ---- | ------------- |
| `[nzPopconfirmTitle]` | Title of the confirmation box | `string \| TemplateRef<void>` | - |
| `[nzPopconfirmTrigger]` | Popconfirm trigger mode | `'click' \| 'focus' \| 'hover'` | `'hover'` |
| `[nzPopconfirmTrigger]` | Popconfirm trigger mode. If set to `null` it would not be triggered | `'click' \| 'focus' \| 'hover' \| null` | `'hover'` |
| `[nzPopconfirmPlacement]` | The position of the popconfirm relative to the target | `'top' \| 'left' \| 'right' \| 'bottom' \| 'topLeft' \| 'topRight' \| 'bottomLeft' \| 'bottomRight' \| 'leftTop' \| 'leftBottom' \| 'rightTop' \| 'rightBottom'` | `'top'` |

> From version 8.2.0, API without prefix above, e.g `nzTitle` is deprecated, please upgrade as soon as possible.
Expand Down
2 changes: 1 addition & 1 deletion components/popconfirm/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| `[nzPopconfirmTitle]` | 确认框的描述 | `string \| TemplateRef<void>` | - |
| `[nzPopconfirmTrigger]` | 触发行为 | `'click' \| 'focus' \| 'hover'` | `'hover'` |
| `[nzPopconfirmTrigger]` | 触发行为,为 `null` 时不响应光标事件 | `'click' \| 'focus' \| 'hover' \| null` | `'hover'` |
| `[nzPopconfirmPlacement]` | 气泡框位置 | `'top' \| 'left' \| 'right' \| 'bottom' \| 'topLeft' \| 'topRight' \| 'bottomLeft' \| 'bottomRight' \| 'leftTop' \| 'leftBottom' \| 'rightTop' \| 'rightBottom'` | `'top'` |

> 从 8.2.0 版本开始,以上 API 对应的无前缀 API,如 `nzTitle` 已被废除,请及时迁移。
Expand Down
2 changes: 1 addition & 1 deletion components/popover/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { NzPopoverModule } from 'ng-zorro-antd/popover';
| ----- | ----------- | ---- | ------------- |
| `[nzPopoverTitle]` | Title of the popover | `string \| TemplateRef<void>` | - |
| `[nzPopoverContent]` | Content of the popover | `string \| TemplateRef<void>` | - |
| `[nzPopoverTrigger]` | Popover trigger mode | `'click' \| 'focus' \| 'hover'` | `'hover'` |
| `[nzPopoverTrigger]` | Popover trigger mode. If set to `null` it would not be triggered | `'click' \| 'focus' \| 'hover' \| null` | `'hover'` |
| `[nzPopoverPlacement]` | The position of the popover relative to the target | `'top' \| 'left' \| 'right' \| 'bottom' \| 'topLeft' \| 'topRight' \| 'bottomLeft' \| 'bottomRight' \| 'leftTop' \| 'leftBottom' \| 'rightTop' \| 'rightBottom'` | `'top'` |

> From version 8.2.0, API without prefix above, e.g `nzTitle` is deprecated, please upgrade as soon as possible.
Expand Down
2 changes: 1 addition & 1 deletion components/popover/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { NzPopoverModule } from 'ng-zorro-antd/popover';
| --- | --- | --- | --- |
| `[nzPopoverTitle]` | 标题 | `string \| TemplateRef<void>` | - |
| `[nzPopoverContent]` | 用于定义内容 | `string \| TemplateRef<void>` | - |
| `[nzPopoverTrigger]` | 触发行为 | `'click' \| 'focus' \| 'hover'` | `'hover'` |
| `[nzPopoverTrigger]` | 触发行为,为 `null` 时不响应光标事件 | `'click' \| 'focus' \| 'hover' \| null` | `'hover'` |
| `[nzPopoverPlacement]` | 气泡框位置 | `'top' \| 'left' \| 'right' \| 'bottom' \| 'topLeft' \| 'topRight' \| 'bottomLeft' \| 'bottomRight' \| 'leftTop' \| 'leftBottom' \| 'rightTop' \| 'rightBottom'` | `'top'` |

> 从 8.2.0 版本开始,以上 API 对应的无前缀 API,如 `nzTitle` 已被废除,请及时迁移。
Expand Down
4 changes: 1 addition & 3 deletions components/tooltip/base/nz-tooltip-base.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ export abstract class NzTooltipBaseDirective implements OnChanges, OnInit, OnDes
// When the method gets invoked, all properties has been synced to the dynamic component.
// After removing the old API, we can just check the directive's own `nzTrigger`.
const el = this.elementRef.nativeElement;

const trigger = this.isDynamicTooltip ? this.trigger : this.tooltip.nzTrigger;

if (trigger === 'hover') {
Expand Down Expand Up @@ -277,8 +276,7 @@ export abstract class NzTooltipBaseDirective implements OnChanges, OnInit, OnDes
this.show();
})
);
// Hiding would be triggered by the component itself.
} // else do nothing because user wants to control the visibility programmatically.
} // Else do nothing because user wants to control the visibility programmatically.
}

/**
Expand Down
2 changes: 1 addition & 1 deletion components/tooltip/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
| Property | Description | Type | Default |
| -------- | ----------- | ---- | ------- |
| `[nzTooltipTitle]` | The text shown in the tooltip | `string \| TemplateRef<void>` | - |
| `[nzTooltipTrigger]` | Tooltip trigger mode | `'click' \| 'focus' \| 'hover'` | `'hover'` |
| `[nzTooltipTrigger]` | Tooltip trigger mode. If set to `null` it would not be triggered | `'click' \| 'focus' \| 'hover' \| null` | `'hover'` |
| `[nzTooltipPlacement]` | The position of the tooltip relative to the target | `'top' \| 'left' \| 'right' \| 'bottom' \| 'topLeft' \| 'topRight' \| 'bottomLeft' \| 'bottomRight' \| 'leftTop' \| 'leftBottom' \| 'rightTop' \| 'rightBottom'` | `'top'` |

> From version 8.2.0, API without prefix above, e.g `nzTitle` is deprecated, please upgrade as soon as possible.
Expand Down
2 changes: 1 addition & 1 deletion components/tooltip/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| `[nzTooltipTitle]` | 提示文字 | `string \| TemplateRef<void>` | - |
| `[nzTooltipTrigger]` | 触发行为,可选 `hover/focus/click` | `'click' \| 'focus' \| 'hover'` | `'hover'` |
| `[nzTooltipTrigger]` | 触发行为,可选 `hover/focus/click`,为 `null` 时不响应光标事件 | `'click' \| 'focus' \| 'hover' \| null` | `'hover'` |
| `[nzTooltipPlacement]` | 气泡框位置 | `'top' \| 'left' \| 'right' \| 'bottom' \| 'topLeft' \| 'topRight' \| 'bottomLeft' \| 'bottomRight' \| 'leftTop' \| 'leftBottom' \| 'rightTop' \| 'rightBottom'` | `'top'` |

> 从 8.2.0 版本开始,以上 API 对应的无前缀 API,如 `nzTitle` 已被废除,请及时迁移。
Expand Down

0 comments on commit e0a1a21

Please sign in to comment.