1
0
mirror of https://gitee.com/vant-contrib/vant.git synced 2025-04-06 03:57:59 +08:00

docs(List): add direction up faq ()

This commit is contained in:
neverland 2021-04-19 20:48:30 +08:00 committed by GitHub
parent 436da047e4
commit 9ef870e491
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -253,3 +253,9 @@ body {
```
这个问题的原因是当元素设置了`overflow-x: hidden`样式时,该元素的`overflow-y`会被浏览器设置为`auto`,而不是默认值`visible`,导致 List 无法正确地判断滚动容器。解决方法是去除该样式,或者在 html 和 body 标签上添加`height: 100%`样式。
### direction 属性设置为 up 后一直触发加载?
设置 `direction` 属性为 up 后,当滚动条处于页面顶部时,就会触发 List 组件的加载。
因此在使用该属性时,建议在每次数据加载完成后,将滚动条滚动至页面底部或非顶部的位置。