-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
使用Taro.chooseImage 选择图片后,调用Taro.getCurrentInstance获取到的router和page是空的 #16155
Comments
@TheKonka 这个能复现吗? |
调用扫码相册返回也是这种情况,在有些ios机型下就是必现的 |
我这是在安卓下,也是必现的 |
确实有这个问题 |
@TheKonka 能看下这个吗? |
应该是选择图片的时候触发了 估计选择完图片后就立即执行回调了,这时候还没触发 taro/packages/taro-runtime/src/dsl/common.ts Lines 162 to 180 in a87ad10
taro/packages/taro-runtime/src/dsl/common.ts Lines 181 to 187 in a87ad10
不过这样也确实很坑,在 render 方法里获取路由参数这些也要尤其注意,在此场景下render方法里使用 |
相关平台
微信小程序
小程序基础库: 3.4.7
使用框架: Vue 3
复现步骤
使用Taro.chooseImage 选择图片后,调用Taro.getCurrentInstance获取到的router和page是空的
这个是大概的场景,不知道是不是因为小程序选择图片弹出了新的窗口,选择完毕后导致这个问题?
期望结果
可以正确获取当前页面
实际结果
获取到的router 和page 都是null
环境信息
The text was updated successfully, but these errors were encountered: