import Vue from 'vue';

Vue.directive('loadMore', {
	bind(el, binding) {
		const SELECT_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap');
    SELECT_DOM.addEventListener('scroll', _.debounce(function () {
      const CONDITION = parseInt(this.scrollHeight - this.scrollTop) <= this.clientHeight+1
      if (CONDITION) {
        binding.value()
      }
    },200))
	}
})