Skip to content

Commit

Permalink
Dropdown: remove transition delay when trigger is click (#9573)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopoldthecoder committed Jan 31, 2018
1 parent 40e815f commit f274f3e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
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

0 comments on commit f274f3e

Please sign in to comment.