Merge pull request #3219 from thomasyonug/dev

cascader:bug fix #3191. when menuIndex = 0 edge case
pull/3313/head
cinwell.li 2017-03-06 18:48:58 +08:00 committed by GitHub
commit cdc482c0c4
1 changed files with 4 additions and 2 deletions

View File

@ -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>