[bugfix] Tab: click event param missing (#3866)

This commit is contained in:
neverland
2019-07-16 17:13:05 +08:00
committed by GitHub
parent aba5f59fdd
commit a594774ee2
2 changed files with 31 additions and 3 deletions
+3 -3
View File
@@ -276,12 +276,12 @@ export default createComponent({
// emit event when clicked
onClick(index) {
const { title, disabled, name } = this.children[index];
const { title, disabled, computedName } = this.children[index];
if (disabled) {
this.$emit('disabled', name, title);
this.$emit('disabled', computedName, title);
} else {
this.setCurrentIndex(index);
this.$emit('click', name, title);
this.$emit('click', computedName, title);
}
},