The solution to the href on the a tag in Vue cannot jump

created at 07-03-2021 views: 2


Using vue-router, the routing in the a tag under IE does not redirect, Firefox and Chrome work normally.


Add to App.vue to determine that IE browser is manually repaired...

export default {
 name: 'App',
  function checkIE(){
   return '-ms-scroll-limit' in && '-ms-ime-align' in
  if (checkIE()) {
   window.addEventListener('hashchange', () => {
    var currentPath = window.location.hash.slice(1);
    if (this.$route.path !== currentPath) {
  }, false)

The solution to the inability to jump to the href on the a tag in the above Vue is all the content shared by the editor, I hope to give you a reference, and I hope you can support us a lot.

created at:07-03-2021
edited at: 07-03-2021: