Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(react): 修复 preact 地图组件 onRegionChange 事件报错的问题,fix #11462 #12014

Merged
merged 2 commits into from
Jun 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/taro-plugin-react/src/runtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ if (__TARO_FRAMEWORK__ === 'preact') {
i = i.toLowerCase()
}

if (type === 'map' && i === 'onregionchange') {
// map 组件的 regionchange 事件非常特殊,详情:https://github.com/NervJS/taro/issues/5766
normalizedProps.onbegin = value
normalizedProps.onend = value
continue
}

normalizedProps[i] = value
}

Expand Down