/
githubmirror
/
vuetify
Обзор
Документация
Войти
/
githubmirror
/
vuetify
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/docs/src/components/doc/RelatedPage.vue
31 строка
746 B
John Leider
chore: add vue/attributes-order eslint rule
29 фев 2024, 07:06
29 фев 2024, 07:06
65aff8f
Код
Авторство
О чём код?
<template> <v-list-item v-if="item" :subtitle="subtitle" :title="item.meta.nav ?? item.meta.title" :to="item.path" lines="two" border rounded > <template #prepend> <v-avatar> <v-icon :color="icon.color" :icon="icon.icon" /> </v-avatar> </template> </v-list-item> </template> <script setup> const appStore = useAppStore() const props = defineProps({ to: String }) const routes = useRouter().getRoutes() const path = rpath(props.to) const item = routes.find(r => r.path === path) const category = path.split('/')[2] const icon = computed(() => appStore.categories[category]) const subtitle = upperFirst(category.replace('-', ' ')) </script>