mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[Improvement] Tab: click event add title param (#761)
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
:duration="duration"
|
||||
:sticky="sticky"
|
||||
:swipeable="swipeable"
|
||||
@click="handleTabClick"
|
||||
@disabled="handleTabDisabledClick"
|
||||
@click="$emit('click')"
|
||||
@disabled="$emit('disabled')"
|
||||
>
|
||||
<van-tab :title="firstTabTitle" :disabled="firstTabDisabled">内容一</van-tab>
|
||||
<van-tab title="选项二">内容二</van-tab>
|
||||
@@ -33,15 +33,6 @@ export default {
|
||||
active: 0,
|
||||
duration: 0.5
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleTabClick(index) {
|
||||
this.$emit('click');
|
||||
},
|
||||
handleTabDisabledClick(index) {
|
||||
this.$emit('disabled');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user