在跳转页面的时候 关闭当前页面 这个功能怎么实现?
在跳转页面的时候 关闭当前页面 这个功能怎么实现?
在跳转页面的时候 关闭当前页面 这个功能怎么实现?
isActive(route) {
return route.path === this.$route.path
},
// 然后在我需要提交的方法内
const view = {
path: "/performance/audit", // 审批绩效
}
// 跳转页面时关闭当前
this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
if (this.isActive(view)) {
this.toLastView(visitedViews, view)
}
})
可以使用打开窗口并将父窗口关闭的方式呀。
在点击关闭当前的时候调用下面的函数
function close(url){//url是点击跳转页面的地址
let w = window.open(url,'_blank');
w.opener.close();
}