<el-select
v-model="form.equipName"
placeholder="请选择"
v-el-select-loadmore="loadmore"//自定义绑定
@change="selectChange"
>
//自定义指令
directives: {
'el-select-loadmore': {
bind(el, binding) {
const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap');
SELECTWRAP_DOM.addEventListener('scroll', function () {
const condition = this.scrollHeight - this.scrollTop <= this.clientHeight;
if (condition) {
binding.value();
}
});
}
}
loadmore() {
console.log('触底');
},