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

微信小程序内 rang 组件卡顿 #2829

Closed
522109452 opened this issue Dec 5, 2024 · 0 comments
Closed

微信小程序内 rang 组件卡顿 #2829

522109452 opened this issue Dec 5, 2024 · 0 comments

Comments

@522109452
Copy link
Contributor

NutUI React 包名

@nutui/nutui-react

NutUI React 版本号

2.7.1

平台

weapp

重现链接

https://github.com/jdf2e/nutui-react/blob/next/src/packages/range/range.taro.tsx#L268

重现步骤

  1. 加载组件
  2. 拖动,会感觉有明显的延迟
<Range
                    className="range-item"
                    range
                    value={selected}
                    max={max}
                    min={0}
                    step={data.stepLength}
                    defaultValue={[0, 100]}
                    currentDescription={null}
                    maxDescription={null}
                    minDescription={null}
                    onChange={val => onChageRange(val)}
                />

期望的结果是什么?

不要有明显延迟的感觉

实际的结果是什么?

有明显延迟感

环境信息

👽 Taro v3.6.22

Taro CLI 3.6.22 environment info:
System:
OS: macOS 13.6.9
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v18.20.4/bin/yarn
npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm
npmPackages:
@tarojs/cli: 3.6.22 => 3.6.22
@tarojs/components: 3.6.22 => 3.6.22
@tarojs/helper: 3.6.22 => 3.6.22
@tarojs/plugin-framework-react: 3.6.22 => 3.6.22
@tarojs/plugin-html: 3.6.21 => 3.6.21
@tarojs/plugin-mini-ci: 3.6.22 => 3.6.22
@tarojs/plugin-platform-alipay: 3.6.22 => 3.6.22
@tarojs/plugin-platform-h5: 3.6.22 => 3.6.22
@tarojs/plugin-platform-jd: 3.6.22 => 3.6.22
@tarojs/plugin-platform-qq: 3.6.22 => 3.6.22
@tarojs/plugin-platform-swan: 3.6.22 => 3.6.22
@tarojs/plugin-platform-tt: 3.6.22 => 3.6.22
@tarojs/plugin-platform-weapp: 3.6.22 => 3.6.22
@tarojs/react: 3.6.22 => 3.6.22
@tarojs/runtime: 3.6.22 => 3.6.22
@tarojs/shared: 3.6.22 => 3.6.22
@tarojs/taro: 3.6.22 => 3.6.22
@tarojs/taro-loader: 3.6.22 => 3.6.22
@tarojs/webpack5-runner: 3.6.22 => 3.6.22
babel-preset-taro: 3.6.22 => 3.6.22
eslint-config-taro: 3.6.22 => 3.6.22
react: ^18.0.0 => 18.2.0

其他补充信息

主要原因是 getRectByTaro 在微信小程序端每次执行需要 100+ms 的时间

@522109452 522109452 changed the title rang 组件卡顿 微信小程序内 rang 组件卡顿 Dec 5, 2024
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

1 participant