记一次dva不使用路由,但需要懒加载组件的情况,因为只有一个IndexPage路由,所以没有必要使用路由,
但因为直接在文件头使用import IndexPage from "./routes/IndexPage";
会直接运行import语句和组件之间的代码,如下
import React, {
Component} from 'react'
import {
connect } from 'dva';
//在IndexPage被引入时就会调用
let test = control.