diff --git a/src/components/Charts/index.js b/src/components/Charts/index.js index cea9949134a75a5dd71768c9e630bf86eca4bacb..d974de6708da4edcc18980e543b0dbdf3f782fec 100644 --- a/src/components/Charts/index.js +++ b/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, diff --git a/src/index.js b/src/index.js index e6fd2f07b43d0ffe556329584e5406fb0f1842d0..72440e8bb532a69655e443644d871c79b2942fef 100644 --- a/src/index.js +++ b/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');