Skip to content

Instantly share code, notes, and snippets.

<template>
<div class="tw-btn-group tw-mx-auto">
<nuxt-link v-if="current > 1" :to="generatePath(current - 1)" class="tw-btn"
>«</nuxt-link
>
<nuxt-link v-if="3 < current" :to="generatePath(1)" class="tw-btn"
>1</nuxt-link
>
<span v-if="4 < current" class="tw-btn tw-btn-disabled">...</span>
<nuxt-link
@takuboy93
takuboy93 / scroll-direction-detector.vue
Last active June 7, 2021 16:33
This is a Vue component which is able to detect up and down scroll directions.
<template>
<div>{{ direction }}</div>
</template>
<script>
export default {
data: function() {
return {
direction: null,
startY: 0