1、push跳转
1.1、params传参,动态传参,数据会显示在地址栏中,且刷新页面不会消失
router.push({name: "MarineSpecialAddOrUpdate", //跳转的组件名字params: { //参数id: id,activeNames: "composition"}})
1.2、query传参,传递的参数会显示在地址栏中
router.push({path: "/business/marineSpecialAddOrUpdate",//跳转的路径query: { //参数id: id,activeNames: "composition"}})
2、点击跳转后打开一个新窗口
const {href} = router.resolve({name:'MarineSpecialAddOrUpdate',//跳转的组件名字params: {id: id,},});window.open(href, "_blank");const {href} = router.resolve({path:'/business/MarineSpecialAddOrUpdate',//跳转路径query: {id: id,},});window.open(href, "_blank");const {href} = router.resolve({name:'MarineSpecialAddOrUpdate',//跳转的组件名字query: {id: id,},});window.open(href, "_blank");