Merge pull request #4584 from baosc/dev

index-bar 在wx:if为false时, 抛异常
This commit is contained in:
nemo-shen 2021-12-22 23:18:42 +08:00 committed by GitHub
commit 8aecb0e843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,9 @@ VantComponent({
setListRect() {
return getRect(this, '.van-index-bar').then((rect) => {
if (!isDef(rect)) {
return;
}
Object.assign(this, {
height: rect.height,
top: rect.top + this.scrollTop,