Skip to content

Commit

Permalink
WIP(wx-react): 支持小程序原生组件: 事件参数等支持
Browse files Browse the repository at this point in the history
affects: @areslabs/wx-react
  • Loading branch information
ykforerlang committed Feb 14, 2020
1 parent d8e7af4 commit f06465f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/wx-react/src/WxNormalComp.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ export default function (compPath) {
while (compInst && compInst instanceof HocComponent) {
compInst = compInst._c[0]
}
const eh = compInst.__eventHanderMap[eventKey]
let eh = compInst.__eventHanderMap[eventKey]

// map地图组件的regionchange事件 type为begin/end
if (!eh && (e.type === 'begin' || e.type === 'end')) {
eh = compInst.__eventHanderMap[e.currentTarget.dataset.diuu + 'regionchange']
}

if (eh) {
//TODO event参数
eh()
eh(e)
}
}
}
Expand Down

0 comments on commit f06465f

Please sign in to comment.