若依(ruoyi)管理系统,自定义按钮跳转页面

// route.js中新增

// 公共路由
export const constantRoutes = [
{
    path: '/businessProcess',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'marineSpecialAddOrUpdate',
        component: () => import('@/views/businessProcess/marineSpecial/marineSpecialAddOrUpdate'),
        name: 'marineSpecialAddOrUpdate',
        meta: { title: '海运专线新增/修改', icon: 'user' }
      }
    ]
  }
]



// 组件中新增跳转路由

   新增




//亦可点击按钮跳转
function goAddOrUpdate(row) {
  router.push({
    path: '/businessProcess/marineSpecialAddOrUpdate',
    query: {
      // id: row.id
    }
  })
}

你可能感兴趣的:(vue,elementui,vue.js,javascript)