mirror of https://github.com/ElemeFE/element
Merge pull request #3219 from thomasyonug/dev
cascader:bug fix #3191. when menuIndex = 0 edge casepull/3313/head
commit
cdc482c0c4
|
@ -73,8 +73,10 @@
|
|||
select(item, menuIndex) {
|
||||
if (item.__IS__FLAT__OPTIONS) {
|
||||
this.activeValue = item.value;
|
||||
} else {
|
||||
} else if (menuIndex) {
|
||||
this.activeValue.splice(menuIndex, this.activeValue.length - 1, item.value);
|
||||
} else {
|
||||
this.activeValue = [item.value];
|
||||
}
|
||||
this.$emit('pick', this.activeValue);
|
||||
},
|
||||
|
@ -168,4 +170,4 @@
|
|||
);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue