去除首页hometop方法里的 rect.top报错问题
This commit is contained in:
@@ -194,7 +194,9 @@ const hometop = async () => {
|
|||||||
const query = uni.createSelectorQuery().select('#fourcontent');
|
const query = uni.createSelectorQuery().select('#fourcontent');
|
||||||
query
|
query
|
||||||
.boundingClientRect((rect) => {
|
.boundingClientRect((rect) => {
|
||||||
elementTop.value = rect.top - store.height;
|
if(rect){
|
||||||
|
elementTop.value = rect.top - store.height;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.exec();
|
.exec();
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|||||||
Reference in New Issue
Block a user