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('/');
相關文章
相關標籤/搜索