Skip to content

Commit

Permalink
fix(taro-quickapp): 修复快应用事件绑定异常问题
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Jan 7, 2020
1 parent e245932 commit cccf7ee
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/taro-quickapp/src/create-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,18 @@ function processEvent (eventHandlerName, obj) {
get () {
return Object.assign(currentTarget || target || {}, event.detail)
}
},
stopPropagation: {
value: () => {}
},
preventDefault: {
value: () => {}
}
})
if (!event.stopPropagation) {
Object.defineProperty(event, 'stopPropagation', {
value: () => {}
})
}
if (!event.preventDefault) {
Object.defineProperty(event, 'preventDefault', {
value: () => {}
})
}
}

const scope = this.$component
Expand Down

0 comments on commit cccf7ee

Please sign in to comment.