一.如果参数在路径中
1.打开新窗口
router.js
path: '/project/:id'
var { href } = this.$router.resolve({
path: '/project',
query: {
id: this.id
}
});
window.open(href,'_blank');
复制代码
获取参数:this.$route.query.id
二.如果参数不在路径中
1.不打开新窗口
var href = this.$router.push({
name: '项目列表',
params: {
msg : this.msg
}
});
复制代码
获取参数:this.$route.params.msg
2.打开新窗口
var { href } = this.$router.resolve({
name: '项目列表',
});
localStorage.setItem("msg", this.msg)
window.open(href,'_blank');
复制代码
获取参数:
if (localStorage.getItem('msg')){
this.m= localStorage.getItem('msg');
localStorage.clear();
};
复制代码
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END






















![[桜井宁宁]COS和泉纱雾超可爱写真福利集-一一网](https://www.proyy.com/skycj/data/images/2020-12-13/4d3cf227a85d7e79f5d6b4efb6bde3e8.jpg)

![[桜井宁宁] 爆乳奶牛少女cos写真-一一网](https://www.proyy.com/skycj/data/images/2020-12-13/d40483e126fcf567894e89c65eaca655.jpg)