欧勇 2019-02-20 18:07 采纳率: 0%
浏览 1233

在使用antd全家桶的进行开发的时候,link的时候url改变了。但是页面不刷新到我路由的页面

路由配置

routes: [
    {
      path: '/',
      component: '../layouts/UserLayout',
      routes: [
        { path: '/user', redirect: '../layouts/UserLayout' },
         { path: '/user/register', component: './User/Register' } 
        /* { path: '/user/login', component: './User/Login' },
        ,
        { path: '/user/register-result', component: './User/RegisterResult' }, */
      ],
    },
    {
    path: '/',
    component: '../layouts/Menu',
    routes: [
      {
        path: '/',
        component: 'survey',
      },
      {
        path: 'puzzlecards',
        component: './puzzlecards'
      },
      {
        path: 'list',
        component: './list'
      },
      {
        path: '/survey',
        component: 'survey'
      },
      {
        path: '/dashboard',
        routes: [
          { path: '/dashboard/analysis', component: 'Dashboard/Analysis' },
          { path: '/dashboard/monitor', component: 'Dashboard/Monitor' },
          { path: '/dashboard/workplace', component: 'Dashboard/Workplace' }
        ]
      }
    ]
  }]
<Link to = "/user/register">register now!</Link>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 u盘问题:盘符不显示 无媒体
    • ¥50 R语言读取nc按月均值转为tif
    • ¥30 智能车串级pid调参
    • ¥15 visual studio code翻译老是错误
    • ¥20 卫星测高数据的高程转换
    • ¥15 爬取招聘网站数据信息
    • ¥15 安装完tensorflow,import tensorflow as tf后报错,如何解决?
    • ¥15 ultralytics库导出onnx模型,模型失去预测能力
    • ¥15 linux下点对点协议连接2个USB串口的硬件流量控制问题
    • ¥15 SQL数据自动生成问题