This commit is contained in:
2024-02-28 13:33:03 +08:00
parent f825f81fd9
commit f0d75ed1a8

View File

@@ -51,7 +51,7 @@ onBeforeMount(() => {
})
const init = async () => {
await Promise.all([getAreaList(), dictDataCache(),getUserById()]).then(res => {
await Promise.all([getAreaList(), dictDataCache(), getUserById()]).then(res => {
dictData.state.area = res[0].data
dictData.state.basic = res[1].data
adminInfo.dataFill(res[2].data)
@@ -66,7 +66,9 @@ const init = async () => {
item.path = item.routePath
item.name = item.routePath
item.keepalive = item.routePath
item.component = item.routeName.indexOf('/src/views/') > -1 ? item.routeName : `/src/views/${item.routeName}/index.vue`
if (item.routeName) {
item.component = item.routeName.indexOf('/src/views/') > -1 ? item.routeName : `/src/views/${item.routeName}/index.vue`
}
item.type = item.children && item.children.length > 0 ? 'menu_dir' : 'menu'
item.menu_type = item.children && item.children.length > 0 ? null : 'tab'
if (item.children) {