index.js 447 Bytes
Newer Older
1
import dva from 'dva';
afc163's avatar
afc163 committed
2
import G2 from 'g2';
3 4
import 'moment/locale/zh-cn';
import models from './models';
ddcat1115's avatar
ddcat1115 committed
5
// import { browserHistory } from 'dva/router';
6 7
import './index.less';

afc163's avatar
afc163 committed
8 9
G2.track(false);

10 11 12 13 14 15 16 17
// 1. Initialize
const app = dva({
  // history: browserHistory,
});

// 2. Plugins
// app.use({});

ddcat1115's avatar
ddcat1115 committed
18
// 3. Model move to router
19 20 21 22 23 24 25 26 27
models.forEach((m) => {
  app.model(m);
});

// 4. Router
app.router(require('./router'));

// 5. Start
app.start('#root');