提交代码

This commit is contained in:
unknown
2023-05-11 16:22:07 +08:00
parent 309b4e2fb6
commit fcd9576fd9
128 changed files with 20369 additions and 157 deletions

View File

@@ -1,8 +1,8 @@
/*
* @Author: zwq
* @Date: 2023-01-04 10:29:39
* @LastEditors: zwq
* @LastEditTime: 2023-01-05 15:52:02
* @LastEditors: zhp
* @LastEditTime: 2023-03-20 16:37:21
* @Description:
*/
import Vue from 'vue'
@@ -43,7 +43,7 @@ export const moduleRoutes = {
]
}
export function addDynamicRoute (routeParams, router) {
export function addDynamicRoute(routeParams, router) {
// 组装路由名称, 并判断是否已添加, 如是: 则直接跳转
var routeName = routeParams.routeName
var dynamicRoute = window.SITE_CONFIG['dynamicRoutes'].filter(item => item.name === routeName)[0]
@@ -132,6 +132,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
var temp = []
for (var i = 0; i < menuList.length; i++) {
if (menuList[i].children && menuList[i].children.length >= 1) {
console.log(menuList[i].children);
temp = temp.concat(menuList[i].children)
continue
}
@@ -143,7 +144,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
meta: {
...window.SITE_CONFIG['contentTabDefault'],
menuId: menuList[i].id,
title: menuList[i].name
title: menuList[i].name,
}
}
// eslint-disable-next-line
@@ -157,6 +158,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
route['component'] = () => import(`@/views/modules/${URL}`)
}
routes.push(route)
// console.log(route);
}
if (temp.length >= 1) {
return fnAddDynamicMenuRoutes(temp, routes)