短视频平台开发,点击链接、图片自动跳转到新的页面
方法一
//跳转页面
JumpPage(product){
let Detail= this.$router.resolve({
//要跳转的页面的名称
name:"名称",
//传参
query:{
"key":value,"key2":value}
})
//以新窗口打开
window.open(Detail.href,'_blank')
}
方法二
//跳转页面
JumpPage(product){
//在链接后加值
let Detail=this.$router.resolve('地址'+需要传的值);
//如:let Detail=this.$router.resolve('/Challenge/Details/'+row.id);
//以新窗口打开
window.open(Detail.href,'_blank')
}
跳转后接受参数:
//接参
let key= this.$route.query.key;
let key2= this.$route.query.key2;
以上就是 短视频平台开发,点击链接、图片自动跳转到新的页面,更多内容欢迎关注之后的文章