|
|
|
@ -146,12 +146,19 @@ export const useUserStore = defineStore('app-user', {
|
|
|
|
|
const menus: MenuItem[] = [] |
|
|
|
|
for (let i = 0; i < __menus.length; i++) { |
|
|
|
|
const __menu = __menus[i] |
|
|
|
|
const componentName = __menu.path |
|
|
|
|
.replace('/index', '') |
|
|
|
|
.split('/') |
|
|
|
|
.filter(Boolean) |
|
|
|
|
.map(i => `${i[0].toUpperCase()}${i.slice(1)}`) |
|
|
|
|
.join('') |
|
|
|
|
|
|
|
|
|
menus.push({ |
|
|
|
|
id: __menu.id, |
|
|
|
|
parentId: __menu.parentId, |
|
|
|
|
name: __menu.name, |
|
|
|
|
component: `${__menu.path}.vue`, |
|
|
|
|
// componentName?: string
|
|
|
|
|
componentName, |
|
|
|
|
path: __menu.path, |
|
|
|
|
icon: __menu.source, |
|
|
|
|
sort: __menu.sort, |
|
|
|
|