/
githubmirror
/
vuetify
Обзор
Документация
Войти
/
githubmirror
/
vuetify
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/docs/src/components/doc/UpNext.vue
72 строки
2 KB
J-Sek
feat: migrate to MD3 typography (#22557)
28 янв 2026, 21:50
Не верифицирован
28 янв 2026, 21:50
311daf4
Код
Авторство
О чём код?
<template> <div id="up-next" class="d-flex mb-5" > <router-link v-if="(prev && prev.name !== 'home')" :to="prev.path" class="text-decoration-none text-body-large d-inline-flex align-center" > <v-icon :icon="arrows.prev" class="me-1" color="primary" /> <span class="text-primary" v-text="prev.meta.nav ?? prev.meta.title" /> </router-link> <v-spacer /> <router-link v-if="next" :to="next.path" class="text-decoration-none text-body-large d-inline-flex align-center" > <span class="text-primary" v-text="next.meta.nav ?? next.meta.title" /> <v-icon :icon="arrows.next" class="ms-1" color="primary" /> </router-link> </div> </template> <script setup> const { pages } = useAppStore() const route = useRoute() const path = computed(() => route.path.split('/').slice(2, -1)) const routes = computed(() => useRouter().getRoutes()) const currentIndex = computed(() => pages.indexOf(path.value.join('/'))) const prev = computed(() => { if (currentIndex.value === -1) return false const prevPath = rpath(pages[currentIndex.value - 1]) if (prevPath == null) return false return routes.value.find(r => r.path === prevPath) }) const next = computed(() => { if (currentIndex.value === -1) return false const nextPath = rpath(pages[currentIndex.value + 1]) return routes.value.find(r => r.path === nextPath) }) const { isRtl } = useRtl() const arrows = computed(() => ({ next: !isRtl ? 'mdi-chevron-left' : 'mdi-chevron-right', prev: !isRtl ? 'mdi-chevron-right' : 'mdi-chevron-left', })) </script>