climblee / uv-ui

uv-ui 破釜沉舟之兼容vue3+2、app、h5、小程序等多端基于uni-app和uView2.x的生态框架,支持单独导入,开箱即用,利剑出击。
MIT License
665 stars 33 forks source link

Bug:微信小程序 uv-index-list 设置 customNavHeight 后,锚点定位位置偏移 #79

Open JasonYadi opened 4 months ago

JasonYadi commented 4 months ago

问题描述: uv-index-list 组件上方还有其他元素时候, 设置了 customNavHeight 后,锚点定位位置偏移。 问题原因: 查看了uv-index-list 源码,微信小程序使用的是 scrollTop 进行锚点定位,取的是 children 的 top,但是 uv-index-list 上面有其他元素时,children 的 top 应该是需要减去 uv-index-list 上方元素的的高度,也就是需要减去 customNavHeight 才能准确的定位锚点。