This commit is contained in:
surida 2025-04-13 17:30:24 +08:00
parent 611c658841
commit 11ed62275b

View File

@ -60,13 +60,14 @@ export default {
methods: { methods: {
// select menu item // select menu item
onOpenChange (openKeys) { onOpenChange (openKeys) {
if(openKeys.length == 1 || this.selectedKeys[0] == '/dashboard/analysis') this.latestOpenKey = openKeys // if(openKeys.length == 1 || this.selectedKeys[0] == '/dashboard/analysis') this.latestOpenKey = openKeys
if(openKeys.length == 1) this.latestOpenKey = openKeys
else if(openKeys.length == 2) this.latestOpenKey = [openKeys[1]] else if(openKeys.length == 2) this.latestOpenKey = [openKeys[1]]
openKeys = this.latestOpenKey // openKeys = this.latestOpenKey
// 在水平模式下时执行,并且不再执行后续 // 在水平模式下时执行,并且不再执行后续
if (this.mode === 'horizontal') { if (this.mode === 'horizontal') {
// this.openKeys = this.latestOpenKey this.openKeys = this.latestOpenKey
this.openKeys = openKeys // this.openKeys = openKeys
return return
} }
// 非水平模式时 // 非水平模式时