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.
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:
* 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 - b r e a d c r u m b >
< / template >