移动端 H5 scrollTop 回到顶部

     this.$nextTick(() => {
        this.$refs.navBox.scrollTop = 0;
      });

 this.$nextTick(() => {
        let scrollElem = this.$refs.scrollDiv;
        scrollElem.scrollTo({ top: 0, behavior: 'smooth' });
      });

 

posted @ 2022-12-06 17:06  ThisCall  阅读(557)  评论(0)    收藏  举报