import * as React from 'react' ; import { Loader } from 'rsuite' ; import HomeView from './home/index' ; const ControlView = React . lazy ( ( ) => import ( './control' ) ) ; const NotFoundView = React . lazy ( ( ) => import ( './NotFound' ) ) ; const ControlUseStatisticsView = React . lazy ( ( ) => import ( './control/UseStatistics' ) ) ; const ApplicationKeyView = React . lazy ( ( ) => import ( './control/ApplicationKey' ) ) ; const QuestionListView = React . lazy ( ( ) => import ( './control/QuestionList' ) ) ; const QuestionCreateView = React . lazy ( ( ) => import ( './question/QuestionCreate' ) ) ; const Suspense = ( props ) => { return ( < React . Suspense fallback = { < Loader center backdrop content = "loading..." / > } > { props ?. children } < /React.Suspense>); } ; const HomeScreen = < HomeView />; / / 首页 const ControlScreen = ( < Suspense > < ControlView /> < /Suspense>); / / 控制页面 const ControlUseStatistics = ( < Suspense > < ControlUseStatisticsView /> < /Suspense>); / / 控制页面 const ApplicationKey = ( < Suspense > < ApplicationKeyView /> < /Suspense>); / / 控制页面 const QuestionList = ( < Suspense > < QuestionListView /> < /Suspense>); / / 控制页面 const QuestionCreate = ( < Suspense > < QuestionCreateView /> < /Suspense>); / / 添加题目 const NotFoundScreen = ( < Suspense > < NotFoundView /> < /Suspense>); / / 错误默认页面 export { HomeScreen , ControlScreen , NotFoundScreen , ControlUseStatistics , ApplicationKey , QuestionList , QuestionCreate , } ;