
export function optionScrollRegister(app){
  console.log(app,'apppp');
  app.directive('loadMore', {
    beforeMount(el, binding,node) {
      // console.log(binding,'binding',node,node.teleported,el,el.querySelector('.el-select-dropdown .el-select-dropdown__wrap'));
      // return 
      const SELECT_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap');
      // return console.log(SELECT_DOM,'SELECT_DOM');
      if(!SELECT_DOM) return 
      SELECT_DOM.addEventListener('scroll', _.debounce(function () {
        const CONDITION = parseInt(this.scrollHeight - this.scrollTop) <= this.clientHeight+1
        if (CONDITION) {
          binding.value()
        }
      },200))
    }
  })
}

