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

使用Taro.chooseImage 选择图片后,调用Taro.getCurrentInstance获取到的router和page是空的 #16155

Open
ice909 opened this issue Jul 25, 2024 · 5 comments
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@ice909
Copy link
Contributor

ice909 commented Jul 25, 2024

相关平台

微信小程序

小程序基础库: 3.4.7
使用框架: Vue 3

复现步骤

使用Taro.chooseImage 选择图片后,调用Taro.getCurrentInstance获取到的router和page是空的
这个是大概的场景,不知道是不是因为小程序选择图片弹出了新的窗口,选择完毕后导致这个问题?
image

期望结果

可以正确获取当前页面

实际结果

获取到的router 和page 都是null

环境信息

👽 Taro v3.6.20


  Taro CLI 3.6.20 environment info:
    System:
      OS: Linux 6.6 Deepin 23 23
      Shell: 5.9 - /usr/bin/zsh
    Binaries:
      Node: 20.14.0 - ~/.config/nvm/versions/node/v20.14.0/bin/node
      npm: 10.7.0 - ~/.config/nvm/versions/node/v20.14.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.20 => 3.6.20 
      @tarojs/components: 3.6.20 => 3.6.20 
      @tarojs/helper: 3.6.20 => 3.6.20 
      @tarojs/plugin-framework-vue3: 3.6.20 => 3.6.20 
      @tarojs/plugin-html: 3.6.20 => 3.6.20 
      @tarojs/plugin-platform-alipay: 3.6.20 => 3.6.20 
      @tarojs/plugin-platform-h5: 3.6.20 => 3.6.20 
      @tarojs/plugin-platform-jd: 3.6.20 => 3.6.20 
      @tarojs/plugin-platform-qq: 3.6.20 => 3.6.20 
      @tarojs/plugin-platform-swan: 3.6.20 => 3.6.20 
      @tarojs/plugin-platform-tt: 3.6.20 => 3.6.20 
      @tarojs/plugin-platform-weapp: 3.6.20 => 3.6.20 
      @tarojs/runtime: 3.6.20 => 3.6.20 
      @tarojs/shared: 3.6.20 => 3.6.20 
      @tarojs/taro: 3.6.20 => 3.6.20 
      @tarojs/taro-loader: 3.6.20 => 3.6.20 
      @tarojs/webpack5-runner: 3.6.20 => 3.6.20 
      babel-preset-taro: 3.6.20 => 3.6.20 
      eslint-config-taro: 3.6.20 => 3.6.20 


@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Jul 25, 2024
This was referenced Jul 27, 2024
@ice909
Copy link
Contributor Author

ice909 commented Aug 7, 2024

@TheKonka 这个能复现吗?
https://github.com/linuxdeepin/bbs-mobile-web
也是这个项目的

@ct-0902
Copy link

ct-0902 commented Aug 21, 2024

调用扫码相册返回也是这种情况,在有些ios机型下就是必现的

@ice909
Copy link
Contributor Author

ice909 commented Aug 22, 2024

调用扫码相册返回也是这种情况,在有些ios机型下就是必现的

我这是在安卓下,也是必现的

@adjfks
Copy link

adjfks commented Sep 14, 2024

确实有这个问题

@ice909
Copy link
Contributor Author

ice909 commented Sep 20, 2024

@TheKonka 能看下这个吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
Status: Todo
Development

No branches or pull requests

3 participants