el-scrollbar 监测滚动条

export function processScroll (_this) {
  let _self = _this
  let scrollbarEl = _this.$parent.wrap
  scrollbarEl.onscroll = function() {
    if(scrollbarEl.scrollTop > 170) {
      _self.prostyle = {
        position: 'fixed',
         '100%',
        maxWidth: '810px',
        top: 0
      }
    } else {
      _self.prostyle = {
        
      }
    }
  }
}
 
在监测滚动的位置时候 做样式的修改
原文地址:https://www.cnblogs.com/buxiugangzi/p/12481848.html