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