今天爱分享给大家带来Vue Scripts may close only the windows that were opened by it【解决办法】,希望能够帮助到大家。
原因:脚本只能关闭它所打开的窗口,原因是浏览器基于安全策略限制了脚本关闭非它所打开的窗口机制。
解决方案:此项目可以通过调用$store中的数据和方法进行删除。
this.$store.commit("deleteTabs", this.activeIndex);
this.$store.commit("setActiveIndex", this.openTab[this.openTab.length-1].route);
this.$router.push({ path: this.activeIndex })
原文链接:https://blog.itblood.com/1250.html,转载请注明出处。

![GuiltyHell2 纯白女神艾莉II V42[更新/新敌人][10.5G] [大型ACT/中文/动态]](/wp-content/uploads/replace/2025/10/02/996bc63cbe43dda363e661ff8ade25cd.webp)