|
|
@@ -11,6 +11,20 @@ Vue.prototype.$axios = axios
|
|
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
|
|
+// 注册 表格滚动底部指令
|
|
|
+Vue.directive('moretable', {
|
|
|
+ bind(el, binding) {
|
|
|
+ // 获取element-ui定义好的scroll盒子 表格滚动底部事件
|
|
|
+ const TABLE_DOM = el.querySelector('.el-table__body-wrapper')
|
|
|
+ TABLE_DOM.addEventListener('scroll', function () {
|
|
|
+ const CONDITIONVALUE = this.scrollHeight - this.scrollTop <= this.clientHeight
|
|
|
+ if (CONDITIONVALUE) {
|
|
|
+ binding.value()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
new Vue({
|
|
|
render: h => h(App),
|
|
|
}).$mount('#app')
|