Files
orion-visor/orion-ops-ui/src/components/app/breadcrumb/index.vue

40 lines
785 B
Vue
Raw Normal View History

2023-07-24 10:05:07 +08:00
<template>
<a-breadcrumb class="container-breadcrumb">
<a-breadcrumb-item>
<icon-apps />
</a-breadcrumb-item>
<a-breadcrumb-item v-for="item in items" :key="item">
2023-09-29 17:24:25 +08:00
{{ item }}
2023-07-24 10:05:07 +08:00
</a-breadcrumb-item>
</a-breadcrumb>
</template>
<script lang="ts" setup>
import { PropType } from 'vue';
2023-09-29 17:24:25 +08:00
import { useRoute } from 'vue-router';
2023-07-24 10:05:07 +08:00
defineProps({
items: {
type: Array as PropType<string[]>,
default() {
2023-09-29 17:24:25 +08:00
return useRoute().matched
.map(s => s.meta?.locale)
.filter(Boolean) || [];
2023-07-24 10:05:07 +08:00
},
},
});
</script>
<style scoped lang="less">
.container-breadcrumb {
:deep(.arco-breadcrumb-item) {
color: rgb(var(--gray-6));
&:last-child {
color: rgb(var(--gray-8));
}
}
}
</style>