提交 6c67c8a9 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

修复面包屑

上级 3ab05808
......@@ -36,6 +36,7 @@ async function handleKeepAlive(to) {
router.beforeEach(async(to, from, next) => {
const userStore = useUserStore()
to.meta.matched = JSON.parse(JSON.stringify(to.matched))
handleKeepAlive(to)
const token = userStore.token
// 在白名单中的判断情况
......
......@@ -31,6 +31,7 @@
</el-col>
<el-col :xs="10" :lg="14" :md="14" :sm="9" :xl="14" :pull="1">
<el-breadcrumb class="breadcrumb">
<el-breadcrumb-item
v-for="item in matched.slice(1,matched.length)"
:key="item.path"
......@@ -119,7 +120,6 @@ import { useRouterStore } from '@/pinia/modules/router'
const router = useRouter()
const route = useRoute()
const routerStore = useRouterStore()
console.log(routerStore.keepAliveRouters)
// 三种窗口适配
const isCollapse = ref(false)
const isSider = ref(true)
......@@ -186,7 +186,7 @@ const backgroundColor = computed(() => {
}
})
const matched = computed(() => route.matched)
const matched = computed(() => route.meta.matched)
const changeUserAuth = async(id) => {
const res = await setUserAuthority({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册