mirror of
https://gitee.com/chu1204505056/vue-admin-beautiful.git
synced 2025-04-06 03:58:00 +08:00
✅Update public layout logic
This commit is contained in:
parent
96de07d09a
commit
cb41ab4f8a
@ -92,11 +92,10 @@
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler({ fullPath, matched }) {
|
||||
//暂未研究清楚此处,待改进
|
||||
if (fullPath === '/index') fullPath = '/'
|
||||
if (fullPath === '/test/test') fullPath = '/test'
|
||||
this.selectedKeys = [fullPath]
|
||||
handler({ path, matched }) {
|
||||
matched[0].children.length > 1
|
||||
? (this.selectedKeys = [path])
|
||||
: (this.selectedKeys = [matched[0].path])
|
||||
this.openKeys = [matched[0].path]
|
||||
},
|
||||
immediate: true,
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a-menu-item :key="routeChildren.fullPath" @click="handleLink">
|
||||
<a-menu-item :key="routeChildren.path" @click="handleLink">
|
||||
<span class="anticon">
|
||||
<vab-icon :icon="routeChildren.meta.icon"></vab-icon>
|
||||
</span>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<template v-if="item.children && item.children.length">
|
||||
<vab-menu
|
||||
v-for="route in item.children"
|
||||
:key="route.fullPath"
|
||||
:key="route.path"
|
||||
:item="route"
|
||||
></vab-menu>
|
||||
</template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user