Service cityChoose where the service is available
A
B
C
D
F
G
H
J
VElevator keeps the index rail synchronized with the group header currently crossing the content viewport. Reaching the bottom activates the final group, while index clicks scroll only the component list and never move the browser document.
<script setup lang="ts">
import { VElevator } from '@varo-ui/h5'
import { ref } from 'vue'
const activeIndex = ref('A')
const indexes = [
{ title: 'A', items: ['Austin', 'Atlanta', 'Albany'] },
{ title: 'B', items: ['Boston', 'Berkeley', 'Boulder'] },
{ title: 'C', items: ['Chicago', 'Cambridge', 'Cleveland'] }
]
</script>
<template>
<VElevator v-model:active-index="activeIndex" :indexes="indexes" />
</template>activeIndex updates when a group heading crosses the content container top.| Prop | Type | Default | Description |
|---|---|---|---|
activeIndex | string | undefined | Active index |
defaultActiveIndex | string | undefined | Default uncontrolled index |
indexes | ElevatorGroup[] | [] | Indexed groups |
| Event | Payload | Description |
|---|---|---|
update:activeIndex | string | Active index changed |
change | string | Active index changed |
clickItem | (item, index) | Group item clicked |