Vue在新窗口打开页面的方法
程序员文章站
2022-04-05 08:06:49
...
Vue在新窗口打开页面的方法
window.open(href, ‘_blank’)
routerPushSettingTemplate() {
let { href } = this.$router.resolve({path: '/box/edit', query: {boxId: this.boxId}})
window.open(href, '_blank')
},
另外一种获取路径的方法: window.location.origin
上一篇: js的装饰符 @