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

[vue-router] Route with name ‘SetServerReceivingAddress’ does not exist

路由规则:

{
    
    
        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的第一个字母是小写,但是使用的时候第一个字母却成了大写

猜你喜欢

转载自blog.csdn.net/weixin_43131046/article/details/123203126
今日推荐