zoukankan      html  css  js  c++  java
  • 小程序mpvue使用scroll-view

    // autoHeight 必须有高度 :scroll-y="true"  设置横向竖向滚动
    <scroll-view :style="{height:autoHeight}" :scroll-y="true"  @scroll="scroll"  :scroll-with-animation="true" class="scroll-warp" :enable-back-to-top="true">
     </scroll-view> 
             
    scroll(e) {
                  // console.log(e.mp.detail.scrollTop)
                   if(e.mp.detail.scrollTop>36){
                       this.navBackgroundColor = '#fff'
                       this.titleColor = 'black'
                       this.title = '智慧家工程师'
                       this.returnLeft = ''
                   }else{
                       this.title = ''
                       this.navBackgroundColor = ''
                       this.titleColor = '#fff'
                       this.returnLeft = ''
                   }
                }, 

    作者:人参,每篇随笔皆原创(除非注明原作者的随笔),欢迎指正!

  • 相关阅读:
    coder的脚印
    Mysql
    MSDos
    Windows Develop
    Eclipse 使用总结
    DBA常用SQL
    SSH总结
    Unity3D协程
    yield的作用
    UGUI优化
  • 原文地址:https://www.cnblogs.com/panax/p/14437910.html
Copyright © 2011-2022 走看看