vue 实现跳转到新页面并传参数
打开新页面传参
webssh(scope){
this.getpodDetai(scope)
const route = this.$router.resolve({
path: '/workload/pod/terminal',
query:{
namespace: this.namespaceValue,
pod_name: scope.row.metadata.name,
container_name: this.container_name,
}
})
window.open(route.href,"_blank")
}
新页面获取参数
created(){
this.namespace = this.$route.query.namespace
this.pod_name = this.$route.query.pod_name
this.container_name = this.$route.query.container_name
console.log(this.namespace,this.pod_name,this.container_name)
},