Skip to content

Fix 修复支付宝下setup context 报错#2297

Merged
hiyuki merged 7 commits into
masterfrom
fix-ali-setup-context
Nov 5, 2025
Merged

Fix 修复支付宝下setup context 报错#2297
hiyuki merged 7 commits into
masterfrom
fix-ali-setup-context

Conversation

@mackwang112
Copy link
Copy Markdown
Collaborator

@mackwang112 mackwang112 commented Nov 3, 2025

现状:
支付宝仅页面存在 getOpenerEventChannel 方法,组件不存在getOpenerEventChannel方法,导致setup中 this.target.getOpenerEventChannel.bind(this.target) 报错

微信小程序表现:页面,组件都存在getOpenerEventChannel方法,但组件实例getOpenerEventChannel方法调用返回undefined

当getOpenerEventChannel方法不存在可使用noop方法作为兜底,可对齐微信小程序表现

@hiyuki hiyuki merged commit 058df97 into master Nov 5, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants