The problem

Using vue-router in IE, the route in TAB A is not redirected. Firefox and Chrome work normally.Copy the code

Solution:

Add judge IE browser manual repair in app. vue...Copy the code
Modify the code as follows: SRC/app.vueCopy the code
<template> <div id="app"> <router-view/> </div> </template> <script> export default { name: "App", mounted() { function checkIE() { return ( "-ms-scroll-limit" in document.documentElement.style && "-ms-ime-align" in document.documentElement.style ); } if (checkIE()) { window.addEventListener( "hashchange", () => { var currentPath = window.location.hash.slice(1); if (this.$route.path ! == currentPath) { this.$router.push(currentPath); // this.$router.replace(currentPath) } }, false ); }}}; </script>Copy the code

Reproduced atMenphis.blog.csdn.net/article/det…