📅  最后修改于: 2022-03-11 15:02:18.110000             🧑  作者: Mango
showBanner(e) {
const rect = this.btnDownload.current.getBoundingClientRect()
const isInView = rect.top < window.innerHeight
const isAtTop = rect.top <= 0
console.log('Is in view:', isInView)
console.log('Is at top:', isAtTop)
}