diff --git a/components/ATabs.vue b/components/ATabs.vue index 4ce9559..92db3ea 100644 --- a/components/ATabs.vue +++ b/components/ATabs.vue @@ -50,34 +50,34 @@ function toggle(value: string) { emit("tabSelected", value); activeValue.value = value; } + +import { ref, onMounted, onBeforeUnmount } from "vue"; + +const tabsContainer = ref(null); +const showLeftGradient = ref(false); + +function handleScroll() { + if (tabsContainer.value) { + showLeftGradient.value = tabsContainer.value.scrollLeft > 0; + } +} + +onMounted(() => { + handleScroll(); +}); +