-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Taro.createSelectorQuery获取高度偶尔为null #7146
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
微信小程序
小程序基础库: 2.12.0
使用框架: React
复现步骤
useReady(() => {
const query = Taro.createSelectorQuery()
query.select('#header').boundingClientRect(res => {
//获取导航栏高度
let { height } = res
console.log(height)
}).exec()
})
期望结果
每次打开都能获取到高度
实际结果
打开之后偶尔高度为null
环境信息
The text was updated successfully, but these errors were encountered: