Skip to content

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

Open
@ice909

Description

@ice909

相关平台

微信小程序

小程序基础库: 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 


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    F-vue3Framework - Vue 3T-weappTarget - 编译到微信小程序V-3Version - 3.x

    Type

    No type

    Projects

    • Status

      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions