From c74d2aff9205df7fda3387498cdea269d53069de Mon Sep 17 00:00:00 2001 From: fengguoqiang Date: Sat, 10 Aug 2024 14:30:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Du-index-list=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEcustomNavHeight=E5=80=BCstring=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=97=A0=E6=95=88=EF=BC=8C=E4=BB=A5=E5=8F=8A=E5=9C=A8=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=B8=8B=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?customNavHeight=E5=90=8E=E7=82=B9=E5=87=BB=E7=B4=A2=E5=BC=95?= =?UTF-8?q?=E5=AD=97=E6=AF=8D=E6=BB=9A=E5=8A=A8=E4=BD=8D=E7=BD=AE=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uview-ui/components/u-index-list/u-index-list.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uni_modules/uview-ui/components/u-index-list/u-index-list.vue b/uni_modules/uview-ui/components/u-index-list/u-index-list.vue index d7126185..65250767 100644 --- a/uni_modules/uview-ui/components/u-index-list/u-index-list.vue +++ b/uni_modules/uview-ui/components/u-index-list/u-index-list.vue @@ -189,7 +189,7 @@ // 设置列表的高度为整个屏幕的高度 //减去this.customNavHeight,并将this.scrollViewHeight设置为maxHeight //解决当u-index-list组件放在tabbar页面时,scroll-view内容较少时,还能滚动 - this.scrollViewHeight = this.sys.windowHeight - this.customNavHeight + this.scrollViewHeight = this.sys.windowHeight - uni.$u.getPx(this.customNavHeight) }, // 索引列表被触摸 touchStart(e) { @@ -307,7 +307,7 @@ // #endif // #ifdef MP-WEIXIN // 微信小程序下,scroll-view的scroll-into-view属性无法对slot中的内容的id生效,只能通过设置scrollTop的形式去移动滚动条 - this.scrollTop = this.children[currentIndex].top + this.scrollTop = this.children[currentIndex].top - uni.$u.getPx(this.customNavHeight) // #endif // #ifdef APP-NVUE // 在nvue中,由于cell和header为同级元素,所以实际是需要对header(anchor)进行偏移