Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown: remove transition delay when trigger is click #9573

Merged
merged 1 commit into from Jan 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/docs/en-US/dropdown.md
Expand Up @@ -328,8 +328,8 @@ Besides default size, Dropdown component provides three additional sizes for you
| placement | placement of pop menu | string | top/top-start/top-end/bottom/bottom-start/bottom-end | bottom-end |
| trigger | how to trigger | string | hover/click | hover |
| hide-on-click | whether to hide menu after clicking menu-item | boolean | — | true |
| show-timeout | Delay time before show a dropdown | number | — | 250 |
| hide-timeout | Delay time before hide a dropdown | number | — | 150 |
| show-timeout | Delay time before show a dropdown (only works when trigger is `hover`) | number | — | 250 |
| hide-timeout | Delay time before hide a dropdown (only works when trigger is `hover`) | number | — | 150 |

### Dropdown Events
| Event Name | Description | Parameters |
Expand Down
4 changes: 2 additions & 2 deletions examples/docs/es/dropdown.md
Expand Up @@ -330,8 +330,8 @@ Además del tamaño predeterminado, el componente Dropdown proporciona tres tama
| placement | colocación del menú | string | top/top-start/top-end/bottom/bottom-start/bottom-end | bottom-end |
| trigger | cómo detonar | string | hover/click | hover |
| hide-on-click | si se oculta el menú después de hacer clic en el elemento | boolean | — | true |
| show-timeout | Tiempo de retardo antes de mostrar un dropdown | number | — | 250 |
| hide-timeout | Tiempo de retardo antes de ocultar un dropdown | number | — | 150 |
| show-timeout | Tiempo de retardo antes de mostrar un dropdown (only works when trigger is `hover`) | number | — | 250 |
| hide-timeout | Tiempo de retardo antes de ocultar un dropdown (only works when trigger is `hover`) | number | — | 150 |

### Dropdown Eventos
| Nombre | Descripción | Parametros |
Expand Down
4 changes: 2 additions & 2 deletions examples/docs/zh-CN/dropdown.md
Expand Up @@ -334,8 +334,8 @@ Dropdown 组件提供除了默认值以外的三种尺寸,可以在不同场
| placement | 菜单弹出位置 | string | top/top-start/top-end/bottom/bottom-start/bottom-end | bottom-end |
| trigger | 触发下拉的行为 | string | hover, click | hover |
| hide-on-click | 是否在点击菜单项后隐藏菜单 | boolean | — | true |
| show-timeout | 展开下拉菜单的延时 | number | — | 250 |
| hide-timeout | 收起下拉菜单的延时 | number | — | 150 |
| show-timeout | 展开下拉菜单的延时(仅在 trigger 为 hover 时有效)| number | — | 250 |
| hide-timeout | 收起下拉菜单的延时(仅在 trigger 为 hover 时有效)| number | — | 150 |

### Dropdown Events
| 事件名称 | 说明 | 回调参数 |
Expand Down
4 changes: 2 additions & 2 deletions packages/dropdown/src/dropdown.vue
Expand Up @@ -115,7 +115,7 @@
clearTimeout(this.timeout);
this.timeout = setTimeout(() => {
this.visible = true;
}, this.showTimeout);
}, this.trigger === 'click' ? 0 : this.showTimeout);
},
hide() {
if (this.triggerElm.disabled) return;
Expand All @@ -124,7 +124,7 @@
clearTimeout(this.timeout);
this.timeout = setTimeout(() => {
this.visible = false;
}, this.hideTimeout);
}, this.trigger === 'click' ? 0 : this.hideTimeout);
},
handleClick() {
if (this.triggerElm.disabled) return;
Expand Down