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

2022/9/15 23:18:35

本文主要是介绍若依(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
}
})
}



这篇关于若依(ruoyi)管理系统,自定义按钮跳转页面的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程