mirror of https://github.com/ElemeFE/element
Cascader: add visible-change event (#13415)
parent
026558682c
commit
c1b869d7ce
|
@ -1697,3 +1697,4 @@ Search and select options with a keyword.
|
|||
| active-item-change | triggers when active option of its parent changes, only works when `change-on-select` is `false` | an array of active options |
|
||||
| blur | triggers when Cascader blurs | (event: Event) |
|
||||
| focus | triggers when Cascader focuses | (event: Event) |
|
||||
| visible-change | triggers when the dropdown appears/disappears | true when it appears, and false otherwise |
|
||||
|
|
|
@ -1702,4 +1702,5 @@ Buscar y seleccionar opciones con una palabra clave.
|
|||
| active-item-change | se dispara cuando la opcion activa del parent cambia, sólo funciona cuando `change-on-select` es `false`. | array de opciones activas |
|
||||
| blur | se dispara cuando Cascader pierde el foco | (event: Event) |
|
||||
| focus | se dispara cuando Cascader obtiene el foco | (event: Event) |
|
||||
| visible-change | se dispara cuando el menu desplegable aparece o desaparece | true cuando aparece, y false en otro caso |
|
||||
|
||||
|
|
|
@ -1697,3 +1697,4 @@
|
|||
| active-item-change | 当父级选项变化时触发的事件,仅在 `change-on-select` 为 `false` 时可用 | 各父级选项组成的数组 |
|
||||
| blur | 在 Cascader 失去焦点时触发 | (event: Event) |
|
||||
| focus | 在 Cascader 获得焦点时触发 | (event: Event) |
|
||||
| visible-change | 下拉框出现/隐藏时触发 | 出现则为 true,隐藏则为 false |
|
||||
|
|
|
@ -165,6 +165,6 @@
|
|||
### Step Slot
|
||||
| name | 说明 |
|
||||
|----|----|
|
||||
| icon | 图标 |
|
||||
| title | 标题 |
|
||||
| description | 描述性文字 |
|
||||
| icon | 自定义图标 |
|
||||
| title | 自定义标题 |
|
||||
| description | 自定义描述性文字 |
|
||||
|
|
|
@ -231,6 +231,7 @@ export default {
|
|||
menuVisible(value) {
|
||||
this.$refs.input.$refs.input.setAttribute('aria-expanded', value);
|
||||
value ? this.showMenu() : this.hideMenu();
|
||||
this.$emit('visible-change', value);
|
||||
},
|
||||
value(value) {
|
||||
this.currentValue = value;
|
||||
|
|
Loading…
Reference in New Issue