http://localhost:9999/dist/

来源:6-2 通用布局的开发(1)

vue不好学

2018-02-15

<Switch>
          <Route exact path="/" component={Home}/>
</Switch>

这样访问为什么匹配不到呢?http://localhost:9999/dist/

        <Switch>
          <Route exact path="/" component={Home}/>
          <Redirect from="*" to="/"/>
        </Switch>

这样又会报重复定义跳转路由的错误, 二者不矛盾吗?

写回答

1回答

君瑾

2018-02-16

应当是 访问  http://localhost:9999/dist/index.hmtl  吧 


0
0

React16+React-Router4 打造企业级电商后台管理系统

【毕设面试】让缺乏框架开发经验的你掌握框架开发

976 学习 · 405 问题

查看课程