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

原文链接:https://blog.csdn.net/ahwangzc/article/details/122505807
// 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' }
}
]
}
]



// 组件中新增跳转路由
<router-link to="/businessProcess/marineSpecialAddOrUpdate">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
>新增</el-button>
</router-link>



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

posted @ 2022-09-15 13:18  枫树湾河桥  阅读(4203)  评论(0编辑  收藏  举报
Live2D