react routerV6 多层路由嵌套不显示的问题


只有一层子路由的时候在页面加入

        就可以了,但是子路由下面还有子路由这样的多层嵌套除了页面要有这个react-router-dom自带的组件以外还要在路由列表加入,如下:
    {
            path: 'event',
            element: ,
            title: '事件',
            icon: 'icon-moban',
            children: [
              {
                path: 'my-event',
                element: (
                  <>
                    
                    
                  
                ),
                title: '我的事件',
                children: [
                  {
                    path: 'exe-event',
                    element: ,
                    title: '完成的事件',
                  },
                ],
              },
              {
                path: 'event-coordinate',
                element: ,
                title: '事件222',
              },
            ],
          },

问题解决