Show button only when the scroll bar goes down, using vuetify

1

Hello. I'm creating a "go to the top of the page" button using vuetify. I can already make it go to the top with the following code:

@click="$vuetify.goTo(0,0)

But now I would like it to only appear if I scroll the page down a little.

I tried this:

data() {
   topo: 0
}

methods: {
 sumir(){
   this.topo = window.pageYOffset || document.documentElement.scrollTop
 }
}

Then I made the button:

:v-show ="topo > 100" ou  v-show ="topo > 100"

both to no avail. Could someone help?

    
asked by anonymous 01.01.2019 / 11:55

0 answers