修改
This commit is contained in:
parent
87e1c601df
commit
3fdbf5360e
@ -1,14 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
Vue.directive('loadmore', {
|
||||
bind(el, binding) {
|
||||
// 获取element-ui定义好的scroll盒子
|
||||
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 == false) {
|
||||
binding.value()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -1,6 +1,5 @@
|
||||
import Vue from 'vue'
|
||||
// import directives from "./directives";
|
||||
Vue.use(directives);
|
||||
|
||||
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
@ -41,9 +40,6 @@ import VueMeta from 'vue-meta'
|
||||
import DictData from '@/components/DictData'
|
||||
|
||||
|
||||
import directives from "./directives";
|
||||
Vue.use(directives);
|
||||
|
||||
|
||||
// 全局方法挂载
|
||||
Vue.prototype.getDicts = getDicts
|
||||
|
||||
Loading…
Reference in New Issue
Block a user