mirror of https://github.com/ElemeFE/element
Select: fix delete-tag
parent
a3dca68fb0
commit
954caf12bc
|
@ -647,7 +647,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 |
|
||||
| delete-tag | triggers when deletes tag in multiple mode | deleted tag value |
|
||||
| delete-tag | triggers when a tag is deleted in multiple mode | deleted tag value |
|
||||
|
||||
### Option Group Attributes
|
||||
| Attribute | Description | Type | Accepted Values | Default |
|
||||
|
|
|
@ -599,8 +599,8 @@
|
|||
deleteTag(event, tag) {
|
||||
let index = this.selected.indexOf(tag);
|
||||
if (index > -1 && !this.disabled) {
|
||||
let deletedTag = this.value.splice(index, 1)[0];
|
||||
this.$emit('delete-tag', deletedTag);
|
||||
this.value.splice(index, 1);
|
||||
this.$emit('delete-tag', tag);
|
||||
}
|
||||
event.stopPropagation();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue