Skip to content

Commit

Permalink
add: avatar与icon传递事件对象
Browse files Browse the repository at this point in the history
  • Loading branch information
jry committed Dec 5, 2024
1 parent b50e010 commit 9c50b06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/uni_modules/uview-plus/components/u-avatar/u-avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@
errorHandler() {
this.avatarUrl = this.defaultUrl || base64Avatar
},
clickHandler() {
this.$emit('click', this.name)
clickHandler(e) {
this.$emit('click', this.name, e)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/uni_modules/uview-plus/components/u-icon/u-icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
addStyle,
addUnit,
clickHandler(e) {
this.$emit('click', this.index)
this.$emit('click', this.index, e)
// 是否阻止事件冒泡
this.stop && this.preventEvent(e)
}
Expand Down

0 comments on commit 9c50b06

Please sign in to comment.