index.vue 754 Bytes
<template>
  <a-breadcrumb class="container-breadcrumb">
    <a-breadcrumb-item>
      <icon-apps />
    </a-breadcrumb-item>
    <a-breadcrumb-item v-for="item in items" :key="item">
      {{ appStore.menuFromServer ? item : $t(item) }}
    </a-breadcrumb-item>
  </a-breadcrumb>
</template>

<script lang="ts" setup>
import { PropType } from 'vue'
import { useAppStore } from '@/store'
const appStore = useAppStore()
defineProps({
  items: {
    type: Array as PropType<string[]>,
    default() {
      return []
    },
  },
})
</script>

<style scoped lang="less">
.container-breadcrumb {
  margin-bottom: 16px;

  :deep(.arco-breadcrumb-item) {
    color: rgb(var(--gray-6));

    &:last-child {
      color: rgb(var(--gray-8));
    }
  }
}
</style>