Commit 6691a8b3 by zhujian

fix

parent 36be8bd1
...@@ -60,6 +60,10 @@ window.RCHistory = _.extend({}, history, { ...@@ -60,6 +60,10 @@ window.RCHistory = _.extend({}, history, {
} }
}); });
window.onhashchange = () => {
routeHook.cancel()
}
function mount() { function mount() {
ReactDOM.render( ReactDOM.render(
<RootRouter />, <RootRouter />,
......
...@@ -18,22 +18,6 @@ import _ from 'underscore'; ...@@ -18,22 +18,6 @@ import _ from 'underscore';
import SwitchRoute from '@/modules/root/SwitchRoute'; import SwitchRoute from '@/modules/root/SwitchRoute';
import ErrorCollege from '@/modules/root/ErrorCollege'; import ErrorCollege from '@/modules/root/ErrorCollege';
const history = createHashHistory(); const history = createHashHistory();
window.RCHistory = _.extend({}, history, {
push: (obj: any) => {
history.push(obj);
},
pushState: (obj: any) => {
history.push(obj);
},
pushStateWithStatus: (obj: any) => {
history.push(obj);
},
goBack: history.goBack,
location: history.location,
replace: (obj: any) => {
history.replace(obj);
},
});
export const RootRouter = () => { export const RootRouter = () => {
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment