{dataRouter && dataRouter.map((child, index) => { return <Route key={index} path={child.path} element={<React.Suspense fallback={<Loading />}> {child.component} </React.Suspense>}> {child.children && child.children.map((item: any, index: any) => { return <Route key={index} path={item.path} element={<React.Suspense fallback={<Loading />}> {item.component} </React.Suspense>}></Route> })} </Route> }