import { useRoutes, Navigate } from 'react-router-dom'
import { lazy, Suspense } from 'react'
const Login = lazy(() => import('./views/login/Index'))
const Layout = lazy(() => import('./views/layout/Index'))
const UserList = lazy(() => import('./views/user/Index'))
const MovieList = lazy(() => import('./views/movie/Index'))
const MovieAdd = lazy(() => import('./views/movie/add'))
// 异步加载lazy需要组合Suspense包裹使用
function elem(dom: any) {
return (