element ui选择框滚动加载下拉项

v-model=“selectMangerList”
filterable
multiple
placeholder
style=“width: 100%”
remote
:remote-method=“remoteMethod”
@visible-change=“change”
reserve-keyword
v-el-select-lazyloading=“loadMore”
>

{{ item.personName }}
{{ item.managerName }}

directives: {
    "el-select-lazyloading": {
      bind(el, binding) {
        let SELECT_DOM = el.querySelector(
          ".el-select-dropdown .el-select-dropdown__wrap"
        );
        SELECT_DOM.addEventListener("scroll", function () {
          let condition =
            this.scrollHeight - this.scrollTop <= this.clientHeight;
          if (condition) {
            binding.value();
          }
        });
      },
    },
  },

loadMore() {
//滚动加载的方法
},

你可能感兴趣的:(ui,vue.js,javascript)