nuxt-spring-boot-showcase/frontend/app/components/SimpleBreadcrumb.vue
2025-11-19 20:22:22 -06:00

41 lines
789 B
Vue

<template>
<u-breadcrumb :items="items" class="my-nav mb-3" />
</template>
<script setup lang="ts">
import type { BreadcrumbItem } from "@nuxt/ui";
import { UBreadcrumb } from "#components";
import type { NavRoute } from "~/ui";
interface Props {
previous: NavRoute[];
last: string;
}
const items = computed(() => {
const arr: BreadcrumbItem[] = [];
for (const h of props.previous) {
arr.push({
label: h.title,
to: h.path,
});
}
arr.push({
label: props.last,
disabled: true,
class: "text-muted",
});
return arr;
});
const props = defineProps<Props>();
</script>
<style>
/* Override default high margins for <ol> lists */
.my-nav ol {
margin-top: 0 !important;
margin-bottom: 0 !important;
padding-left: 0 !important;
}
</style>