Open hebeillc opened 2 months ago
@nutui/nutui-react-taro
2.6.14
weapp
https://codesandbox.io/p/devbox/shopdetail-nx4c6d
期望实现tab跟随页面滚动被选中,滚动到评论区时,评论项被选中,滚动到商品区时,商品项被选中
滚动时,在商品区与评论区交界处出现tab来回选中切换的情况,debug后发现是元素的top值在滚动时不是递增递减,会出现大小波动的情况,在缓慢滚动时比较明显
Taro CLI 4.0.5 environment info: System: OS: macOS 13.5 Shell: 5.9 - /bin/zsh Binaries: Node: 22.9.0 - ~/.nvm/versions/node/v22.9.0/bin/node Yarn: 1.22.22 - ~/.nvm/versions/node/v22.9.0/bin/yarn npm: 10.8.3 - ~/.nvm/versions/node/v22.9.0/bin/npm npmPackages: @tarojs/cli: 4.0.5 => 4.0.5 @tarojs/components: 4.0.5 => 4.0.5 @tarojs/helper: 4.0.5 => 4.0.5 @tarojs/plugin-framework-react: 4.0.5 => 4.0.5 @tarojs/plugin-html: 4.0.5 => 4.0.5 @tarojs/plugin-platform-alipay: 4.0.5 => 4.0.5 @tarojs/plugin-platform-h5: 4.0.5 => 4.0.5 @tarojs/plugin-platform-jd: 4.0.5 => 4.0.5 @tarojs/plugin-platform-qq: 4.0.5 => 4.0.5 @tarojs/plugin-platform-swan: 4.0.5 => 4.0.5 @tarojs/plugin-platform-tt: 4.0.5 => 4.0.5 @tarojs/plugin-platform-weapp: 4.0.5 => 4.0.5 @tarojs/react: 4.0.5 => 4.0.5 @tarojs/runtime: 4.0.5 => 4.0.5 @tarojs/shared: 4.0.5 => 4.0.5 @tarojs/taro: 4.0.5 => 4.0.5 @tarojs/taro-loader: 4.0.5 => 4.0.5 @tarojs/webpack5-runner: 4.0.5 => 4.0.5 babel-preset-taro: 4.0.5 => 4.0.5 eslint-config-taro: 4.0.5 => 4.0.5 react: ^18.0.0 => 18.3.1
No response
NutUI React 包名
@nutui/nutui-react-taro
NutUI React 版本号
2.6.14
平台
weapp
重现链接
https://codesandbox.io/p/devbox/shopdetail-nx4c6d
重现步骤
期望的结果是什么?
期望实现tab跟随页面滚动被选中,滚动到评论区时,评论项被选中,滚动到商品区时,商品项被选中
实际的结果是什么?
滚动时,在商品区与评论区交界处出现tab来回选中切换的情况,debug后发现是元素的top值在滚动时不是递增递减,会出现大小波动的情况,在缓慢滚动时比较明显
环境信息
Taro CLI 4.0.5 environment info: System: OS: macOS 13.5 Shell: 5.9 - /bin/zsh Binaries: Node: 22.9.0 - ~/.nvm/versions/node/v22.9.0/bin/node Yarn: 1.22.22 - ~/.nvm/versions/node/v22.9.0/bin/yarn npm: 10.8.3 - ~/.nvm/versions/node/v22.9.0/bin/npm npmPackages: @tarojs/cli: 4.0.5 => 4.0.5 @tarojs/components: 4.0.5 => 4.0.5 @tarojs/helper: 4.0.5 => 4.0.5 @tarojs/plugin-framework-react: 4.0.5 => 4.0.5 @tarojs/plugin-html: 4.0.5 => 4.0.5 @tarojs/plugin-platform-alipay: 4.0.5 => 4.0.5 @tarojs/plugin-platform-h5: 4.0.5 => 4.0.5 @tarojs/plugin-platform-jd: 4.0.5 => 4.0.5 @tarojs/plugin-platform-qq: 4.0.5 => 4.0.5 @tarojs/plugin-platform-swan: 4.0.5 => 4.0.5 @tarojs/plugin-platform-tt: 4.0.5 => 4.0.5 @tarojs/plugin-platform-weapp: 4.0.5 => 4.0.5 @tarojs/react: 4.0.5 => 4.0.5 @tarojs/runtime: 4.0.5 => 4.0.5 @tarojs/shared: 4.0.5 => 4.0.5 @tarojs/taro: 4.0.5 => 4.0.5 @tarojs/taro-loader: 4.0.5 => 4.0.5 @tarojs/webpack5-runner: 4.0.5 => 4.0.5 babel-preset-taro: 4.0.5 => 4.0.5 eslint-config-taro: 4.0.5 => 4.0.5 react: ^18.0.0 => 18.3.1
其他补充信息
No response