置顶TOP

HTML

  <a href="javascript:void(0)" class="go-top" @click="goTop"></a>
index.js
methods:{
    goTop: function () {
       $('html,body').animate({
           scrollTop: '0px',
       }, 500);
    },
},

猜你喜欢

转载自www.cnblogs.com/liubingyjui/p/13181224.html
top
今日推荐