mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-10-08 18:00:00 +08:00
[bugfix] Tabbar: change event (#1571)
This commit is contained in:
parent
10ed66cbe5
commit
806df7802f
@ -140,7 +140,7 @@ Field 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`k
|
|||||||
|
|
||||||
| 事件 | 说明 | 回调参数 |
|
| 事件 | 说明 | 回调参数 |
|
||||||
|-----------|-----------|-----------|
|
|-----------|-----------|-----------|
|
||||||
| click-icon | 点击尾部图标时触发 | -
|
| click-icon | 点击尾部图标时触发 | - |
|
||||||
|
|
||||||
### 方法
|
### 方法
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ export default create({
|
|||||||
items() {
|
items() {
|
||||||
this.setActiveItem();
|
this.setActiveItem();
|
||||||
},
|
},
|
||||||
|
|
||||||
value() {
|
value() {
|
||||||
this.setActiveItem();
|
this.setActiveItem();
|
||||||
}
|
}
|
||||||
@ -55,9 +56,12 @@ export default create({
|
|||||||
item.active = index === this.value;
|
item.active = index === this.value;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange(active) {
|
onChange(active) {
|
||||||
this.$emit('input', active);
|
if (active !== this.value) {
|
||||||
this.$emit('change', active);
|
this.$emit('input', active);
|
||||||
|
this.$emit('change', active);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user