vue 禁止浏览器自带的后退功能

mounted(){
       history.pushState(null, null, document.URL);
       window.addEventListener('popstate', function () {
         history.pushState(null, null, document.URL);
       });
   }
原文地址:https://www.cnblogs.com/fyjz/p/13220224.html