MCPcopy Create free account
hub / github.com/xerrors/Yuxi / isAtBottom

Method isAtBottom

web/src/utils/scrollController.js:37–43  ·  view source on GitHub ↗

* 检查是否在底部 * @returns {boolean}

()

Source from the content-addressed store, hash-verified

35 * @returns {boolean}
36 */
37 isAtBottom() {
38 const container = this.getContainer()
39 if (!container) return false
40
41 const { threshold } = this.options
42 return container.scrollHeight - container.scrollTop - container.clientHeight <= threshold
43 }
44
45 /**
46 * 处理滚动事件

Callers 2

handleScrollMethod · 0.95
getScrollStateMethod · 0.95

Calls 1

getContainerMethod · 0.95

Tested by

no test coverage detected