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

nut-list listData 为空时,有报错'dValue' of undefinedat updateCachedPosition;bottom' of undefined at getStartIndex #3182

Open
Coralxin opened this issue Sep 2, 2024 · 0 comments

Comments

@Coralxin
Copy link

Coralxin commented Sep 2, 2024

NutUI 包名

@nutui/nutui-taro

NutUI 版本号

3.3.8

平台

weapp

重现链接

https://nutui.jd.com/playground/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cCBsYW5nPVwidHNcIj5cbmltcG9ydCB7IHJlZiwgZGVmaW5lQ29tcG9uZW50IH0gZnJvbSAndnVlJ1xuXG5sZXQgbGlzdERhdGEgPSByZWYobmV3IEFycmF5KDEwMCkuZmlsbCgwKSlcblxuY29uc3QgY2xlYXIgPSAoKT0+e1xuICBsaXN0RGF0YS52YWx1ZT1bXVxufVxuPC9zY3JpcHQ+XG48dGVtcGxhdGU+XG4gIDx2aWV3ID5cbiAgICA8bnV0LWJ1dHRvbiBAY2xpY2s9XCJjbGVhclwiPmNsZWFyPC9udXQtYnV0dG9uPlxuICAgIDxudXQtbGlzdCA6aGVpZ2h0PVwiNTBcIlxuICAgICAgICAgICAgICA6bGlzdERhdGE9XCJsaXN0RGF0YVwiXG4gICAgICAgICAgICAgIDpjb250YWluZXItaGVpZ2h0PVwiMzAwXCIgPlxuICAgICAgPHRlbXBsYXRlIHYtc2xvdD1cInsgaXRlbSwgaW5kZXggfVwiPlxuICAgICAgICA8ZGl2IGNsYXNzPVwibGlzdC1pdGVtXCI+XG4gICAgICAgICAge3sgaW5kZXggfX1cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L3RlbXBsYXRlPlxuICBcdDwvbnV0LWxpc3Q+XG4gIDwvdmlldz5cbjwvdGVtcGxhdGU+In0=

重现步骤

向下滚动一定的距离。点击clear即可,有报错

期望的结果是什么?

scrollHeight=0
scrollTop=0.
无报错

实际的结果是什么?

1、数据清空时有报错TypeError: Cannot read property 'dValue' of undefined at updateCachedPosition
2、scrollHeight仍有高度。可以滚动,滚动时有报错TypeError: Cannot read properties of undefined (reading 'bottom')

环境信息

Taro v3.6.34

Taro CLI 3.6.34 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 18.19.0 - H:\SoftFiles\nodejs\node.EXE
npm: 10.2.3 - H:\SoftFiles\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 3.6.34 => 3.6.34
@tarojs/components: 3.6.34 => 3.6.34
@tarojs/helper: 3.6.34 => 3.6.34
@tarojs/plugin-framework-vue3: 3.6.34 => 3.6.34
@tarojs/plugin-html: ^3.6.33 => 3.6.33
@tarojs/plugin-platform-alipay: 3.6.34 => 3.6.34
@tarojs/plugin-platform-h5: 3.6.34 => 3.6.34
@tarojs/plugin-platform-jd: 3.6.34 => 3.6.34
@tarojs/plugin-platform-qq: 3.6.34 => 3.6.34
@tarojs/plugin-platform-swan: 3.6.34 => 3.6.34
@tarojs/plugin-platform-tt: 3.6.34 => 3.6.34
@tarojs/plugin-platform-weapp: 3.6.34 => 3.6.34
@tarojs/runtime: 3.6.34 => 3.6.34
@tarojs/shared: 3.6.34 => 3.6.34
@tarojs/taro: 3.6.34 => 3.6.34
@tarojs/taro-loader: 3.6.34 => 3.6.34
@tarojs/webpack5-runner: 3.6.34 => 3.6.34
babel-preset-taro: 3.6.34 => 3.6.34
eslint-config-taro: 3.6.34 => 3.6.34

其他补充信息

No response

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