mirror of
https://gitee.com/chu1204505056/vue-admin-beautiful.git
synced 2025-04-06 03:58:00 +08:00
✨修复左侧布局无法展开的bug
This commit is contained in:
parent
d5e038d91f
commit
f00b4a47fe
@ -19,6 +19,7 @@
|
||||
theme="dark"
|
||||
mode="inline"
|
||||
v-model:selectedKeys="selectedKeys"
|
||||
v-model:openKeys="openKeys"
|
||||
>
|
||||
<vab-menu v-for="route in routes" :key="route.path" :item="route" />
|
||||
</a-menu>
|
||||
@ -72,7 +73,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedKeys: ['/index'],
|
||||
selectedKeys: [],
|
||||
openKeys: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -90,11 +92,12 @@
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler({ fullPath }) {
|
||||
handler({ fullPath, matched }) {
|
||||
//暂未研究清楚此处,待改进
|
||||
if (fullPath === '/index') fullPath = '/'
|
||||
if (fullPath === '/test/test') fullPath = '/test'
|
||||
this.selectedKeys = [fullPath]
|
||||
this.openKeys = [matched[0].path]
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user