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

taro2 不支持 百度小程序的 removeSkeleton 方法 #8470

Open
shengbowen opened this issue Jan 7, 2021 · 4 comments
Open

taro2 不支持 百度小程序的 removeSkeleton 方法 #8470

shengbowen opened this issue Jan 7, 2021 · 4 comments
Labels
F-react Framework - React T-swan Target - 编译到百度小程序 V-2 Version - 2.x

Comments

@shengbowen
Copy link

相关平台

百度小程序

小程序基础库: 版本无关
使用框架: React

复现步骤

我看编译后的小程序 页面js是使用的 Component()方法,而不是Page()方法。
而百度小程序的this.removeSkeleton() 只支持在Page里面是调用。
请问为什么taro1编译后页面js使用的是Page(), 而taro2后就变成Component了呢。这样不会有问题么,有没有办法解决呢

期望结果

可以正常调用this.removeSkeleton()

实际结果

不能正常调用 this.removeSkeleton()

环境信息

 Taro CLI 2.2.9 environment info:
    System:
      OS: macOS High Sierra 10.13.6
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.11.0 - ~/.nvm/versions/node/v10.11.0/bin/node
      Yarn: 1.10.0 - ~/.nvm/versions/node/v10.11.0/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v10.11.0/bin/npm
    npmPackages:
      @tarojs/cli: 2.0.7 => 2.0.7
      @tarojs/components: 2.0.7 => 2.0.7
      @tarojs/components-rn: 2.0.7 => 2.0.7
      @tarojs/mini-runner: 2.0.7 => 2.0.7
      @tarojs/plugin-babel: 2.0.7 => 2.0.7
      @tarojs/plugin-csso: 2.0.7 => 2.0.7
      @tarojs/plugin-sass: 2.0.7 => 2.0.7
      @tarojs/plugin-terser: ^2.0.7 => 2.2.10
      @tarojs/redux: 2.0.7 => 2.0.7
      @tarojs/redux-h5: 2.0.7 => 2.0.7
      @tarojs/router: 2.0.7 => 2.0.7
      @tarojs/taro: 2.0.7 => 2.0.7
      @tarojs/taro-alipay: 2.0.7 => 2.0.7
      @tarojs/taro-h5: 2.0.7 => 2.0.7
      @tarojs/taro-redux-rn: 2.0.7 => 2.0.7
      @tarojs/taro-rn: 2.0.7 => 2.0.7
      @tarojs/taro-router-rn: 2.0.7 => 2.0.7
      @tarojs/taro-swan: 2.0.7 => 2.0.7
      @tarojs/taro-tt: 2.0.7 => 2.0.7
      @tarojs/taro-weapp: 2.0.7 => 2.0.7
      @tarojs/webpack-runner: 2.0.7 => 2.0.7
      eslint-config-taro: 2.0.7 => 2.0.7
      eslint-plugin-taro: 2.0.7 => 2.0.7
      nerv-devtools: ^1.5.6 => 1.5.7
      nervjs: ^1.5.6 => 1.5.7
      react: ^16.8.0 => 16.13.1
      react-native: 0.59.9 => 0.59.9
      stylelint-config-taro-rn: 2.0.7 => 2.0.7
      stylelint-taro-rn: 2.0.7 => 2.0.7
@taro-bot2 taro-bot2 bot added F-react Framework - React T-swan Target - 编译到百度小程序 V-2 Version - 2.x labels Jan 7, 2021
@shengbowen
Copy link
Author

应该是修复这个问题导致的, 还带来一个问题是,进入页面redux数据获取延迟了,表现是先为空,后有数据。 回退到2.0.5版本就没有这个问题了。
e4ec6a2

https://github.com/NervJS/taro/commits/e4ec6a26e1cdc329d1ca2882840ad9bd3f3b4e39

@wangfandev
Copy link

这个问题的解决方法是回退到2.0.5版本?修改引入的问题应该有解决办法和问题原因吧,回退后原始的问题还在啊

@HelloAndyZhang
Copy link

HelloAndyZhang commented Jan 14, 2021

@luckyadam 老哥 看看这个问题吧 1.x 版本升级到2.2.16了 就发现百度小程序有问题

@HelloAndyZhang
Copy link

目前这个问题应该怎么解决@luckyadam
老哥 刚才在群里问老李了 你这个问题这样可以解决
this.$scope.removeSkeleton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-swan Target - 编译到百度小程序 V-2 Version - 2.x
Projects
None yet
Development

No branches or pull requests

3 participants