mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 03:44:48 +00:00
[Improvement] Tab: click event add title param (#761)
This commit is contained in:
@@ -229,10 +229,11 @@ export default create({
|
||||
|
||||
// emit event when clicked
|
||||
onClick(index) {
|
||||
if (this.tabs[index].disabled) {
|
||||
this.$emit('disabled', index);
|
||||
const { title, disabled } = this.tabs[index];
|
||||
if (disabled) {
|
||||
this.$emit('disabled', index, title);
|
||||
} else {
|
||||
this.$emit('click', index);
|
||||
this.$emit('click', index, title);
|
||||
this.curActive = index;
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user