javascript - How to scroll down to the bottom of page with vuetify - Stack Overflow

I want to implement an application posed of several card views and a succeeding button. On each click o

I want to implement an application posed of several card views and a succeeding button. On each click of the button, the page should be scrolled to its bottom.

I found some Q&As which implement the scrolling by native javascript, but I did not get how to implement it on Vuetify framework. I looked at the documentation () and noticed that the scrolling is to be implemented via $vuetify.goTo.

But I did not find the exact way to specify the bottom of the page on Vuetify-like style.

Is there any good idea to implement it with good Vuetify maner?

I want to implement an application posed of several card views and a succeeding button. On each click of the button, the page should be scrolled to its bottom.

I found some Q&As which implement the scrolling by native javascript, but I did not get how to implement it on Vuetify framework. I looked at the documentation (https://vuetifyjs./en/directives/scrolling) and noticed that the scrolling is to be implemented via $vuetify.goTo.

But I did not find the exact way to specify the bottom of the page on Vuetify-like style.

Is there any good idea to implement it with good Vuetify maner?

Share Improve this question asked Aug 13, 2019 at 7:27 Yuki HashimotoYuki Hashimoto 1,0738 silver badges22 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 4

You can have a puted property returning the height of the page:

puted: {
    pageHeight () {
      return document.body.scrollHeight
    }
}

And then use vuetify for scrolling to the bottom like:

$vuetify.goTo(pageHeight)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745436311a4627623.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信