置顶TOP

HTML

  <a href="javascript:void(0)" class="go-top" @click="goTop"></a>
index.js
methods:{
    goTop: function () {
       $('html,body').animate({
           scrollTop: '0px',
       }, 500);
    },
},
原文地址:https://www.cnblogs.com/liubingyjui/p/13181224.html