网站运行一段时间后,一回车,就会跳转到首路由,然后刷新之后有好了,请问是怎么回事?
以下是代码:
const history = createHashHistory();
const BasicRoute = () => (
<HashRouter history={history}> <Switch> <Route exact path="/" component={Login}/> <Route path="/home" component={Home}/> <Route path="/login" component={login}/> </Switch> </HashRouter>
);
export default BasicRoute;
待解决
悬赏分:10
- 离问题结束还有 51天6小时58分42秒
点赞 0反对 0举报 0
收藏 0
分享 0
