Skip to content

Commit

Permalink
fix: 修改triggerEvent 调用 __invoke 传参
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackgan3 committed May 15, 2024
1 parent 9b8dd58 commit d82601a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ import Mpx from '../../index'

export default function proxyEventMixin () {
const methods = {
__invoke (rawEvent, type, eventConfig = []) {
const eventObj = type === '__customEvent'
? rawEvent
: {
type,
detail: null,
...rawEvent.nativeEvent
}
__invoke (eventObj, type, eventConfig = []) {
if (typeof Mpx.config.proxyEventHandler === 'function') {
try {
Mpx.config.proxyEventHandler(eventObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function createInstance ({ props, ref, type, rawOptions, currentInject, validPro
},
detail: eventDetail
}
handler.call(this, eventObj, '__customEvent')
handler.call(this, eventObj)
}
},
selectComponent () {
Expand Down

0 comments on commit d82601a

Please sign in to comment.