From b715b720418ed813ff93d75193daca2fa43e154e Mon Sep 17 00:00:00 2001 From: zuiidea Date: Tue, 14 Mar 2017 20:14:58 +0800 Subject: [PATCH] Ajust router.js --- src/router.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/router.js b/src/router.js index c63d24d..187bf0e 100644 --- a/src/router.js +++ b/src/router.js @@ -1,4 +1,4 @@ -import React from 'react' +import React, { PropTypes } from 'react' import { Router } from 'dva/router' import App from './routes/app' @@ -10,7 +10,7 @@ const registerModel = (app, model) => { } } -export default function ({ history, app }) { +const Routers = function ({ history, app }) { const routes = [ { path: '/', @@ -87,3 +87,10 @@ export default function ({ history, app }) { return } + +Routers.propTypes = { + history: PropTypes.object, + app: PropTypes.object, +} + +export default Routers