因为数据过多 简单节流
Vue.directive('loadmore', {
bind (el, binding) {
// 获取element-ui定义好的scroll盒子
constSELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
SELECTWRAP_DOM.addEventListener('scroll',function(){
constCONDITION =this.scrollHeight -this.scrollTop <=this.clientHeight
if(CONDITION) {
binding.value()
}
})
}