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

setState 回调函数在真机上无效 #4125

Closed
yangguo8466 opened this issue Aug 9, 2019 · 7 comments
Closed

setState 回调函数在真机上无效 #4125

yangguo8466 opened this issue Aug 9, 2019 · 7 comments

Comments

@yangguo8466
Copy link

版本信息
Taro CLI 1.3.11 environment info:
System:
OS: macOS 10.14.5
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.11.4 - /usr/local/bin/node
npm: 6.10.2 - /usr/local/bin/npm
npmPackages:
@tarojs/async-await: 1.3.11 => 1.3.11
@tarojs/components: 1.3.11 => 1.3.11
@tarojs/plugin-babel: 1.3.11 => 1.3.11
@tarojs/plugin-csso: 1.3.11 => 1.3.11
@tarojs/plugin-sass: 1.3.11 => 1.3.11
@tarojs/plugin-uglifyjs: 1.3.11 => 1.3.11
@tarojs/redux: 1.3.11 => 1.3.11
@tarojs/redux-h5: 1.3.11 => 1.3.11
@tarojs/router: 1.3.11 => 1.3.11
@tarojs/taro: 1.3.11 => 1.3.11
@tarojs/taro-alipay: 1.3.11 => 1.3.11
@tarojs/taro-h5: 1.3.11 => 1.3.11
@tarojs/taro-swan: 1.3.11 => 1.3.11
@tarojs/taro-weapp: 1.3.11 => 1.3.11
@tarojs/webpack-runner: 1.3.11 => 1.3.11
eslint-config-taro: 1.3.11 => 1.3.11
eslint-plugin-taro: 1.3.11 => 1.3.11
nerv-devtools: ^1.4.3 => 1.4.3
nervjs: ^1.4.3 => 1.4.3
在模拟器上是有效的,不知道是不是版本问题

@taro-bot
Copy link

taro-bot bot commented Aug 9, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@yangguo8466
Copy link
Author

升级到最新到1.3.12 依然是这样

@shenghanqin
Copy link
Collaborator

贴上源代码才能分析问题呀?

@Littly
Copy link
Contributor

Littly commented Aug 11, 2019

代码如何?平台是啥?模拟器系统信息?

@taro-bot
Copy link

taro-bot bot commented Aug 11, 2019

Hello~

您的问题所提供的信息不足,我们无法定位到具体的问题。如果有空的话还请拔冗提供更具体的信息,否则这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@yangguo8466
Copy link
Author

代码如何?平台是啥?模拟器系统信息?

this.setData({
value: 1
},()=>{
console.log("我回调了")
}) 就微信开发工具,还有支付宝开发工具能打印出,但是真机调试无法

@Chen-jj
Copy link
Contributor

Chen-jj commented Aug 12, 2019

@GYDSB 微信小程序真机 setState 回调正常,复现不了。

不知道你的 setData 是误写还是真的是。

还有问题的话,自己打一下 log 定位。https://nervjs.github.io/taro/docs/debug.html#debug-diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants