<script setup>
/**
 * name：
 * user：sa0ChunLuyu
 * date：2022-05-24 11:23:13
 */
import {useStore, useRouterActive} from '~/store'

const $store = useStore()
const $router_active = useRouterActive()
const breadcrumb_list = computed(() => {
  let list = []
  for (let i in $router_active.value) {
    if ($router_active.value[i].key !== 'index') {
      list.push($router_active.value[i])
    }
  }
  return list
})
</script>
<template>
  <n-breadcrumb ml-5>
    <n-breadcrumb-item v-if="breadcrumb_list.length !== 0" href="#">
      {{ $store.config['网站名称'] }}
    </n-breadcrumb-item>
    <n-breadcrumb-item v-for="(bi,bk) in breadcrumb_list" :key="bk" :disabled="bk !== breadcrumb_list.length - 1">
      {{ bi.title }}
    </n-breadcrumb-item>
  </n-breadcrumb>
</template>
