Commit cadcd919 authored by thomasyonug's avatar thomasyonug

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

parent 2a11579d
...@@ -74,7 +74,11 @@ ...@@ -74,7 +74,11 @@
if (item.__IS__FLAT__OPTIONS) { if (item.__IS__FLAT__OPTIONS) {
this.activeValue = item.value; this.activeValue = item.value;
} else { } else {
if (menuIndex) {
this.activeValue.splice(menuIndex, this.activeValue.length - 1, item.value); this.activeValue.splice(menuIndex, this.activeValue.length - 1, item.value);
} else {
this.activeValue = [item.value];
}
} }
this.$emit('pick', this.activeValue); this.$emit('pick', this.activeValue);
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment