|
@@ -113,9 +113,7 @@ export default {
|
|
group: menu._compute._uniqueIndexes[1],
|
|
group: menu._compute._uniqueIndexes[1],
|
|
sub: menu._compute._uniqueIndexes[2]
|
|
sub: menu._compute._uniqueIndexes[2]
|
|
}
|
|
}
|
|
- console.log(activeResult, 'active')
|
|
|
|
Object.keys(activeResult).forEach(v => {
|
|
Object.keys(activeResult).forEach(v => {
|
|
- console.log('v', v)
|
|
|
|
commit('setActiveOfType', {
|
|
commit('setActiveOfType', {
|
|
type: v,
|
|
type: v,
|
|
index: activeResult[v]
|
|
index: activeResult[v]
|
|
@@ -140,7 +138,6 @@ export default {
|
|
dispatch('setActive', findMenu)
|
|
dispatch('setActive', findMenu)
|
|
},
|
|
},
|
|
tryMatchMenu ({ state, dispatch }, { link = '' } = {}) {
|
|
tryMatchMenu ({ state, dispatch }, { link = '' } = {}) {
|
|
- console.log('try link', link)
|
|
|
|
const matchMaps = {}
|
|
const matchMaps = {}
|
|
link = decodeURIComponent(link)
|
|
link = decodeURIComponent(link)
|
|
const filterMenu = state.flatMenus.filter(m => {
|
|
const filterMenu = state.flatMenus.filter(m => {
|
|
@@ -157,7 +154,6 @@ export default {
|
|
}
|
|
}
|
|
return false
|
|
return false
|
|
})
|
|
})
|
|
- console.log('findMe', filterMenu, matchMaps)
|
|
|
|
const firstKey = Object.keys(matchMaps).sort((a,b) => b.length - a.length)[0]
|
|
const firstKey = Object.keys(matchMaps).sort((a,b) => b.length - a.length)[0]
|
|
const findMenu = matchMaps[firstKey]
|
|
const findMenu = matchMaps[firstKey]
|
|
dispatch('setActive', findMenu)
|
|
dispatch('setActive', findMenu)
|