mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
index-bar 在wx:if为false时, 抛异常
This commit is contained in:
parent
47c66d38e3
commit
f2080a3b3b
@ -101,6 +101,9 @@ VantComponent({
|
|||||||
|
|
||||||
setListRect() {
|
setListRect() {
|
||||||
return getRect(this, '.van-index-bar').then((rect) => {
|
return getRect(this, '.van-index-bar').then((rect) => {
|
||||||
|
if (!isDef(rect)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Object.assign(this, {
|
Object.assign(this, {
|
||||||
height: rect.height,
|
height: rect.height,
|
||||||
top: rect.top + this.scrollTop,
|
top: rect.top + this.scrollTop,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user