<a-select
placeholder="请选择"
v-model=""
style="width: 100%"
@popupScroll="scrollMore"//滚动触发的方法
@change="selectedSet"
>
<a-select-option></a-select-option>
</a-select>
scrollMore(e) {
const { target } = e
var total = target.scrollTop + target.offsetHeight
var scrollHeight = target.scrollHeight
console.log('total:' + total)
console.log('scrollHeight:' + scrollHeight)
console.log('-------重要的是下面的判断条件↓--------------------------------')
#this.scrollPage是当前页 this.totalCount是总条数
if (total >= scrollHeight - 1 && total < scrollHeight + 1 && this.scrollPage <
this.totalCount ) {
this.scrollPage = this.scrollPage + 1
this.getCompanyList() // 调用api方法
}
}
getCompanyList(value) {}
网友评论