dva在组件和model外进行路由跳转

import createHistory from 'history/createBrowserHistory';

const history = createHistory();
export default history;
import history from './utils/history';
const app = dva({
  history: history)}
然后在需要的地方直接饮用
history.push('/');

 

posted @ 2019-01-29 17:41  星陨的菲  阅读(1027)  评论(0编辑  收藏  举报