feat(router): 修复HashRouter push与当前页面相同的URL时页面不刷新的问题
This commit is contained in:
parent
78f4bce57c
commit
aa4984f997
|
@ -66,7 +66,9 @@ export function getBaseHistory<S>(
|
||||||
Object.assign(historyProps, nextState);
|
Object.assign(historyProps, nextState);
|
||||||
}
|
}
|
||||||
historyProps.length = browserHistory.length;
|
historyProps.length = browserHistory.length;
|
||||||
const args = { location: historyProps.location, action: historyProps.action };
|
// 避免location饮用相同时setState不触发
|
||||||
|
const location = Object.assign({}, historyProps.location);
|
||||||
|
const args = { location: location, action: historyProps.action };
|
||||||
transitionManager.notifyListeners(args);
|
transitionManager.notifyListeners(args);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue