mirror of https://github.com/ElemeFE/element
Select: add clear event
parent
0c121434e0
commit
bffb1808dc
|
@ -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 |
|
||||
|
|
|
@ -660,6 +660,7 @@
|
|||
| change | 选中值发生变化时触发 | 目前的选中值 |
|
||||
| visible-change | 下拉框出现/隐藏时触发 | 出现则为 true,隐藏则为 false |
|
||||
| remove-tag | 多选模式下移除tag时触发 | 移除的tag值 |
|
||||
| clear | 可清空的单选模式下用户点击清空按钮时触发 | — |
|
||||
|
||||
### Option Group Attributes
|
||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
||||
|
|
|
@ -602,6 +602,7 @@
|
|||
event.stopPropagation();
|
||||
this.$emit('input', '');
|
||||
this.visible = false;
|
||||
this.$emit('clear');
|
||||
},
|
||||
|
||||
deleteTag(event, tag) {
|
||||
|
|
Loading…
Reference in New Issue