directives: { 'el-select-loadmore': { inserted(el, binding) { const SELECTWRAP_DOM = el.querySelector( '.el-select-dropdown .el-select-dropdown__wrap' ); SELECTWRAP_DOM.addEventListener('scroll', function() { /** * console.log(this.scrollHeight,this.clientHeight); * 收起时 this.scro...
1.新建js文件,封装自定义指令(判断select下拉是否到底部) selectLoadmore.js exportdefault{ bind(el, binding) { // 获取element-ui定义好的scroll盒子 constDOM= el.querySelector('.el-select-dropdown .el-select-dropdown__wrap') DOM.addEventListener('scroll',function() { /** * scrollHeight 获取元...