[bugfix] Picker: should not emit change event after init (#517)

This commit is contained in:
neverland
2018-01-08 18:57:46 +08:00
committed by GitHub
parent beee252205
commit cc34c21517
10 changed files with 169 additions and 205 deletions

View File

@@ -79,12 +79,8 @@ export default create({
options(next, prev) {
if (JSON.stringify(next) !== JSON.stringify(prev)) {
this.setIndex(this.defaultIndex);
this.setIndex(0);
}
},
currentIndex(index) {
this.$emit('change', index);
}
},
@@ -139,6 +135,7 @@ export default create({
this.count - 1
]);
this.setIndex(index);
this.$emit('change', index);
}
},