You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
790 B
Vue

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<script setup>
/**
* name
* usersa0ChunLuyu
* date2022-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>