From c4f69fc4078a280ecbf6f64286881fdb4262b16e Mon Sep 17 00:00:00 2001 From: WhatAKitty <104xuqiang@163.com> Date: Thu, 14 Dec 2017 19:42:46 -0600 Subject: [PATCH] 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 --- src/components/Charts/index.js | 2 +- src/index.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/Charts/index.js b/src/components/Charts/index.js index cea99491..d974de67 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 e6fd2f07..72440e8b 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'); -- GitLab