0
点赞
收藏
分享

微信扫一扫

[vue-router] Route with name ‘路由名称‘ does not exist,报错[vue-router] Route with name ‘ ‘ does not exist

木匠0819 2022-03-10 阅读 89

路由规则:

{
        path: '/system/setServerReceivingAddress',
        name: 'setServerReceivingAddress',
        component: SetServerReceivingAddress
      },

使用的时候:

{
            title: i18n.t('setServerReceivingAddress'),
            name: 'SetServerReceivingAddress',
            href: '/system/setServerReceivingAddress',
            enable: control.SYSTEM_NORMAL_PRINTER && !isSlave
          }

// 最后使用的时候是: $router.push('name')

出现上述报错,是因为两者名字没有统一。命名规则的时候,name的第一个字母是小写,但是使用的时候第一个字母却成了大写

举报

相关推荐

0 条评论