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)
    },
posted on 2022-06-21 19:29  每天进步一点点点点点  阅读(663)  评论(0编辑  收藏  举报