mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 18:36:51 +08:00
fix(Tabs): update:active event
This commit is contained in:
parent
d2291f3710
commit
7e47a0721b
@ -86,7 +86,7 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
emits: ['rendered', 'input', 'change', 'disabled', 'click', 'scroll'],
|
emits: ['click', 'change', 'scroll', 'disabled', 'rendered', 'update:active'],
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
this.titleRefs = [];
|
this.titleRefs = [];
|
||||||
@ -243,7 +243,7 @@ export default createComponent({
|
|||||||
if (isDef(currentIndex) && currentIndex !== this.currentIndex) {
|
if (isDef(currentIndex) && currentIndex !== this.currentIndex) {
|
||||||
const shouldEmitChange = this.currentIndex !== null;
|
const shouldEmitChange = this.currentIndex !== null;
|
||||||
this.currentIndex = currentIndex;
|
this.currentIndex = currentIndex;
|
||||||
this.$emit('input', this.currentName);
|
this.$emit('update:active', this.currentName);
|
||||||
|
|
||||||
if (shouldEmitChange) {
|
if (shouldEmitChange) {
|
||||||
this.$emit(
|
this.$emit(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user