salix-front/src/components/LeftMenuItem.vue

27 lines
669 B
Vue
Raw Normal View History

2022-11-29 13:45:48 +00:00
<script setup>
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const props = defineProps({
item: {
type: Object,
required: true,
},
});
const item = computed(() => props.item);
</script>
<template>
2023-04-11 11:31:03 +00:00
<QItem active-class="text-primary" :to="{ name: item.name }" clickable v-ripple>
<QItemSection avatar v-if="item.icon">
<QIcon :name="item.icon" />
</QItemSection>
<QItemSection avatar v-if="!item.icon">
<QIcon name="disabled_by_default" />
</QItemSection>
<QItemSection>{{ t(item.title) }}</QItemSection>
</QItem>
2022-11-29 13:45:48 +00:00
</template>