字典管理ok

This commit is contained in:
仲么了
2024-01-25 11:04:07 +08:00
parent bdc5a452f3
commit 6c8b73eee1
8 changed files with 305 additions and 79 deletions

View File

@@ -62,7 +62,7 @@ const init = async () => {
data.forEach((item: any) => {
item.routePath = item.routePath[0] == '/' ? item.routePath.substring(1, item.routePath.length) : item.routePath
item.path = item.routePath
item.name = item.title
item.name = item.routePath
item.keepalive = item.routePath
item.component = item.routeName || '/src/views/Event-boot/Region/overview.vue'
item.type = item.children && item.children.length > 0 ? 'menu_dir' : 'menu'
@@ -74,7 +74,6 @@ const init = async () => {
}
handlerMenu(res.data)
handleAdminRoute(res.data)
// 预跳转到上次路径
if (route.params.to) {
const lastRoute = JSON.parse(route.params.to as string)
if (lastRoute.path != adminBaseRoutePath) {
@@ -83,7 +82,6 @@ const init = async () => {
return
}
}
// 跳转到第一个菜单
let firstRoute = getFirstRoute(navTabs.state.tabsViewRoutes)
if (firstRoute) routePush(firstRoute.path)