no message
Former-commit-id: abf67b87711c84c44f5827f3140250d76d2fc857 [formerly 0bcb6140d817bd81699c18b27b3e8cc48de2b7e3] [formerly abf67b87711c84c44f5827f3140250d76d2fc857 [formerly 0bcb6140d817bd81699c18b27b3e8cc48de2b7e3] [formerly abf67b87711c84c44f5827f3140250d76d2fc857 [formerly 0bcb6140d817bd81699c18b27b3e8cc48de2b7e3] [formerly 0bcb6140d817bd81699c18b27b3e8cc48de2b7e3 [formerly 91ff6a8680e8865b7fc99e4379c29b8fa0616dbc [formerly 8e91fec2da655749bf3d7466b8e07c2df68802ba]]]]] Former-commit-id: 27de5d1da4fa495b458231e45f62708998eebab1 Former-commit-id: a99ac30418c6e6e74ea9611125cfcda4e2f52e0c Former-commit-id: 3e83bab0b3109819fe10fec6c49e602bc265662a [formerly c8dc7244688c931509d778250f94ccdc84418956] Former-commit-id: e7244bfc2b5db7211fc04da1efde55fa415cccc1 Former-commit-id: a3b4b43e8f2158cdffa08e94b72b4f3b54dd4aac Former-commit-id: 67af38c84165afb3569477a0a9670635bb77e147 Former-commit-id: 6b937abbabad1bd99ccd44b3f8dff69a051f77d1 Former-commit-id: 00093e4e34cfb468ef8c8c6d6a309b3e9d78c30c
This commit is contained in:
parent
6f740765d4
commit
d362d40035
|
|
@ -1 +1 @@
|
|||
28e37c79429114aea200a5e2a7bcc6f8707ab39d
|
||||
dd3ce3a3e8aff371313dd37c30adafe042430be2
|
||||
|
|
@ -32,23 +32,23 @@ export default {
|
|||
/**
|
||||
* @description 初始化
|
||||
* @param {Object} state vuex state
|
||||
* @param {Array} menus menus
|
||||
* @param {Array} menu menu
|
||||
*/
|
||||
init (state, menus) {
|
||||
init (state, menu) {
|
||||
const pool = []
|
||||
const push = function (menus, titlePrefix = []) {
|
||||
menus.forEach(menu => {
|
||||
if (menu.children) {
|
||||
push(menu.children, [ ...titlePrefix, menu.title ])
|
||||
const push = function (menu, titlePrefix = []) {
|
||||
menu.forEach(m => {
|
||||
if (m.children) {
|
||||
push(m.children, [ ...titlePrefix, m.title ])
|
||||
} else {
|
||||
pool.push({
|
||||
...menu,
|
||||
fullTitle: [ ...titlePrefix, menu.title ].join(' / ')
|
||||
...m,
|
||||
fullTitle: [ ...titlePrefix, m.title ].join(' / ')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
push(menus)
|
||||
push(menu)
|
||||
state.pool = pool
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue