Browse Source

No default with export multi objects (#337)

* https://github.com/babel/babel/issues/2212
Fix wrong way of export multi objects.

* Dva model cannot using import for app.model
pull/447/head
WhatAKitty 8 years ago
committed by 偏右
parent
commit
c4f69fc407
  1. 2
      src/components/Charts/index.js
  2. 3
      src/index.js

2
src/components/Charts/index.js

@ -14,7 +14,7 @@ import TimelineChart from './TimelineChart';
const yuan = val => `¥ ${numeral(val).format('0,0')}`;
export default {
export {
yuan,
Bar,
Pie,

3
src/index.js

@ -5,7 +5,6 @@ import './g2';
import './rollbar';
// import browserHistory from 'history/createBrowserHistory';
import './index.less';
import router from './router';
// 1. Initialize
const app = dva({
@ -19,7 +18,7 @@ const app = dva({
app.model(require('./models/global'));
// 4. Router
app.router(router);
app.router(import('./router'));
// 5. Start
app.start('#root');

Loading…
Cancel
Save