cascader:bug fix #3191. when menuIndex = 0 edge case

pull/3219/head
thomasyonug 2017-03-02 21:33:17 +08:00
parent 2a11579dbc
commit cadcd91968
1 changed files with 6 additions and 2 deletions

View File

@ -74,7 +74,11 @@
if (item.__IS__FLAT__OPTIONS) {
this.activeValue = item.value;
} else {
if (menuIndex) {
this.activeValue.splice(menuIndex, this.activeValue.length - 1, item.value);
} else {
this.activeValue = [item.value];
}
}
this.$emit('pick', this.activeValue);
},