1
Hello. I am creating a "go to the top of the page" button using vuetify. I can get him to the top with the following code:
@click="$vuetify.goTo(0,0)
But now I would like it only to appear if I scroll down a bit.
I tried that:
data() {
topo: 0
}
methods: {
sumir(){
this.topo = window.pageYOffset || document.documentElement.scrollTop
}
}
and then I did it in the boot:
:v-show ="topo > 100" ou v-show ="topo > 100"
both unsuccessful. Could someone help?