关闭window.open打开的新标签页时 刷新原页面
解决方法:
将原页面 window.open跳转方式修改
tagetBlank () {
this.windowsOpen = window.open('/sy')
if (!this.windowsOpenLoop) {
this.windowsOpenLoop = setInterval(() => {
if (this.windowsOpen.closed) {
clearInterval(this.windowsOpenLoop)
this.windowsOpenLoop = ''
this.getList() // 重新请求页面数据
}
}, 1000)
}
},
windowsOpen 为提前在data中声明的windowsOpen: {}