#
Junjie
2024-03-21 23d6aacaad1d5fbf7ca78b407e489a39f61ce181
#
1个文件已修改
9 ■■■■ 已修改文件
zy-asrs-flow/src/services/route.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/services/route.js
@@ -77,7 +77,13 @@
    for (const menu of children) {
        if (menu.component !== null && menu.component !== undefined) {
            // children
            const Component = require(`@/pages${menu.path}/index.jsx`).default
            let Component;
            try {
                Component = require(`@/pages${menu.path}/index.jsx`).default
            } catch (error) {
                console.error('An error has occurred: ', error);
            }
            if (Component) {
            const newRoute = {
                name: menu.name,
                path: menu.path,
@@ -85,6 +91,7 @@
            }
            parent.routes.push(newRoute);
            parent.children.push(newRoute);
            }
        } else {
            // parent
            const newRoute = {