We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
微信小程序
小程序基础库: 2.13.0 使用框架: React
在A页面使用 getCurrentInstance获取参数{aid:'111'},然后跳到B页面携带参数{bid:'222'},最后使用Taro.navigateBack({ delta: 1 });方法返回到A页面,这时候在A页面使用getCurrentInstance获取的参数是{bid:'222'},而不是{aid:'111'}。而使用 useRouter() 则不会出现这个情况。
Taro.navigateBack({ delta: 1 });
getCurrentInstance获取正确的参数。
获取的是上一个页面的参数
👽 Taro v3.0.9 Babel could not write cache to file: /Users/presbyter/Desktop/dong-project/dongPlusXcx/node_modules/.cache/@babel/register/.babel.7.9.0.development.json due to a permission issue. Cache is disabled. Taro CLI 3.0.9 environment info: System: OS: macOS 10.15.6 Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.16.3 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.9.0 - /usr/local/bin/npm npmPackages: @tarojs/components: 3.0.9 => 3.0.9 @tarojs/mini-runner: 3.0.9 => 3.0.9 @tarojs/react: 3.0.9 => 3.0.9 @tarojs/runtime: 3.0.9 => 3.0.9 @tarojs/taro: 3.0.9 => 3.0.9 @tarojs/webpack-runner: 3.0.9 => 3.0.9 babel-preset-taro: 3.0.9 => 3.0.9 eslint-config-taro: 3.0.9 => 3.0.9 react: ^16.10.0 => 16.13.1
The text was updated successfully, but these errors were encountered:
开发者工具和真机偶尔可用
Sorry, something went wrong.
No branches or pull requests
相关平台
微信小程序
小程序基础库: 2.13.0
使用框架: React
复现步骤
在A页面使用 getCurrentInstance获取参数{aid:'111'},然后跳到B页面携带参数{bid:'222'},最后使用
Taro.navigateBack({ delta: 1 });
方法返回到A页面,这时候在A页面使用getCurrentInstance获取的参数是{bid:'222'},而不是{aid:'111'}。而使用 useRouter() 则不会出现这个情况。期望结果
getCurrentInstance获取正确的参数。
实际结果
获取的是上一个页面的参数
环境信息
The text was updated successfully, but these errors were encountered: