mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[bugfix] Tabbar: change event (#1571)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user