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',
        width: '100%',
        maxWidth: '810px',
        top: 0
      }
    } else {
      _self.prostyle = {
        
      }
    }
  }
}
 
在監測滾動的位置時候 做樣式的修改


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM