Vue.mixin({ beforeRouteLeave(to, from, next) { if (!to.path.startsWith(from.path)) { this.$destroy(); } next(); } });
临时文件代码存放地址
原文:https://www.cnblogs.com/y896926473/p/9286758.html