[bugfix] Tabbar: change event (#1571)

This commit is contained in:
neverland
2018-08-01 17:37:30 +08:00
committed by GitHub
parent 10ed66cbe5
commit 806df7802f
2 changed files with 7 additions and 3 deletions

View File

@@ -44,6 +44,7 @@ export default create({
items() {
this.setActiveItem();
},
value() {
this.setActiveItem();
}
@@ -55,9 +56,12 @@ export default create({
item.active = index === this.value;
});
},
onChange(active) {
this.$emit('input', active);
this.$emit('change', active);
if (active !== this.value) {
this.$emit('input', active);
this.$emit('change', active);
}
}
}
});