// 监听触底事件
const scrollView = () => {
let tbody = document.querySelector('.el-scrollbar__wrap')
tbody.addEventListener('scroll', (e: any) => {
if (e.target.scrollTop + e.target.offsetHeight >= e.target.scrollHeight && isAske.value == false) {
isAske.value = true
}
})
}
页面加载后调用,scrollView,否则dom获取不到,
isAske用来限制请求的次数,只有请求完成后才可以再次请求数据