Select: add clear event

pull/3526/merge
Leopoldthecoder 2017-05-29 11:27:43 +08:00 committed by 杨奕
parent 0c121434e0
commit bffb1808dc
3 changed files with 3 additions and 0 deletions

View File

@ -665,6 +665,7 @@ Create and select new items that are not included in select options
| change | triggers when the selected value changes | current selected value |
| visible-change | triggers when the dropdown appears/disappears | true when it appears, and false otherwise |
| remove-tag | triggers when a tag is removed in multiple mode | removed tag value |
| clear | triggers when the clear icon is clicked in a clearable Select | — |
### Option Group Attributes
| Attribute | Description | Type | Accepted Values | Default |

View File

@ -660,6 +660,7 @@
| change | 选中值发生变化时触发 | 目前的选中值 |
| visible-change | 下拉框出现/隐藏时触发 | 出现则为 true隐藏则为 false |
| remove-tag | 多选模式下移除tag时触发 | 移除的tag值 |
| clear | 可清空的单选模式下用户点击清空按钮时触发 | — |
### Option Group Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |

View File

@ -602,6 +602,7 @@
event.stopPropagation();
this.$emit('input', '');
this.visible = false;
this.$emit('clear');
},
deleteTag(event, tag) {