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

修复u-index-list设置customNavHeight值string类型无效,以及在微信小程序下设置customNavHeigh #1081

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions uni_modules/uview-ui/components/u-index-list/u-index-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)进行偏移
Expand Down