mirror of
https://github.com/zuiidea/antd-admin.git
synced 2024-04-21 12:32:14 +00:00
upgrade umi@3 partly
This commit is contained in:
@@ -52,7 +52,6 @@ export default {
|
||||
dispatch({ type: 'query' })
|
||||
},
|
||||
setupHistory({ dispatch, history }) {
|
||||
console.log(history)
|
||||
history.listen(location => {
|
||||
dispatch({
|
||||
type: 'updateState',
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
subscriptions: {
|
||||
setup({ dispatch, history }) {
|
||||
history.listen(({ pathname }) => {
|
||||
const match = pathToRegexp('/user/:id', pathname)
|
||||
const match = pathToRegexp('/user/:id').exec(pathname)
|
||||
if (match) {
|
||||
dispatch({ type: 'query', payload: { id: match[1] } })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user