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.14.1 使用框架: Nerv
Taro.preload({ arg: '123' });
// 目标页面获取到的 preloadData 为 undefined const preloadData = Taro.getCurrentInstance().preloadData;
Taro.getCurrentInstance().preloadData能正确获取到 Taro.preload 的数据。
目标页面Taro.getCurrentInstance().preloadData为 undefined
👽 Taro v3.2.5 Taro CLI 3.2.5 environment info: System: OS: macOS 11.2.2 Shell: 5.8 - /bin/zsh Binaries: Node: 10.16.0 - /usr/local/bin/node Yarn: 1.7.0 - /usr/local/bin/yarn npm: 6.14.5 - /usr/local/bin/npm npmPackages: @tarojs/components: 3.2.5 => 3.2.5 @tarojs/mini-runner: 3.2.5 => 3.2.5 @tarojs/runtime: 3.2.5 => 3.2.5 @tarojs/taro: 3.2.5 => 3.2.5 @tarojs/webpack-runner: 3.2.5 => 3.2.5 babel-preset-taro: 3.2.5 => 3.2.5 eslint-config-taro: 3.2.5 => 3.2.5 nervjs: 1.5.7 => 1.5.7 taro-ui: 2.3.0 => 2.3.0
The text was updated successfully, but these errors were encountered:
fix(api): 修复获取不到 Taro.preload 预加载数据的问题,fix #9175
556bb32
1d461d5
这么一改, 原来 Taro.preloadData 的就取不到值了, 需要 Taro.Current.preloadData 希望可以固定一下这个 api 不要总是变 @Chen-jj
Taro.preloadData
Taro.Current.preloadData
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
相关平台
微信小程序
小程序基础库: 2.14.1
使用框架: Nerv
复现步骤
Taro.preload({ arg: '123' });
// 目标页面获取到的 preloadData 为 undefined
const preloadData = Taro.getCurrentInstance().preloadData;
期望结果
Taro.getCurrentInstance().preloadData能正确获取到 Taro.preload 的数据。
实际结果
目标页面Taro.getCurrentInstance().preloadData为 undefined
环境信息
The text was updated successfully, but these errors were encountered: