<template>
  <el-breadcrumb separator="/">
    <el-breadcrumb-item v-for="(item, key) in breadCrumbs" :key="key">{{
      $t(item.name)
    }}</el-breadcrumb-item>
  </el-breadcrumb>
</template>

<script lang="ts" setup>
  import { useRoute } from 'vue-router'
  import { computed } from 'vue'

  const route = useRoute()
  const breadCrumbs = computed(() => {
    return route.matched.filter((item) => {
      if (item.meta.OnBreadCrumb) return true
    })
  })
</script>

<style scoped lang="scss"></style>
