elSelectLoadMore.js 354 B

12345678910111213
  1. export default {
  2. inserted(el, binding, vnode) {
  3. const SELECT_WRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
  4. SELECT_WRAP_DOM.addEventListener('scroll', function() {
  5. const condition = this.scrollHeight - this.scrollTop <= this.clientHeight
  6. if (condition) {
  7. binding.value()
  8. }
  9. })
  10. }
  11. }