我想在request方法里面使用 dispatch(routerRedux.push('/exception/403'));
umi.js 在 with-dva 里面怎么使用 store?
g_app._store.dispatch
是直接在window 下面使用吗?
@sorrycc 请问为什么我在控制台可以看到window下有g_app,在代码里用就会报错undefined?
@sorrycc 请问为什么我在控制台可以看到window下有g_app,在代码里用就会报错undefined?
太快了.
setTimeout(() => console.log('dispatch', window.g_app._store.dispatch), 200);
Most helpful comment
g_app._store.dispatch